from asyncio import constants import gradio as gr import re def desc_to_image(desc): print("*****Inside desc_to_image") desc = " ".join(desc.split('\n')) #desc = desc + ", character art, concept art, artstation" steps, width, height, images, diversity = '50','256','256','1',15 iface = gr.Interface.load("spaces/multimodalart/latentdiffusion") print("about to die",iface,dir(iface)) prompt = re.sub(r'[^a-zA-Z0-9 ,.]', '', desc) print("about to die",prompt) img=iface(desc, steps, width, height, images, diversity)[0] return img def upscale_img(img): iface = gr.Interface.load("spaces/akhaliq/Real-ESRGAN") model='base' uimg=iface(img,models) return uimg demo = gr.Blocks() with demo: gr.Markdown("