import gradio as gr from PIL import Image import io def im_2_bytes(img_path): pil_im=Image.open(img_path) b = io.BytesIO() pil_im.save(b, 'png') im = b.getvalue() return (im) def gen_image(prompt,model_name="dreamlike-art/dreamlike-photoreal-2.0",count = 1): proc=gr.load(f"models/{model_name}") output=proc(f'{prompt}') ''' t=0 output_list=[] while t