from asyncio import constants import gradio as gr import requests import os from base64 import b64decode from PIL import Image import io def generate_image(text): #dalle = gr.Interface.load("spaces/kuprel/min-dalle") dalle = gr.Interface.load("spaces/Axolotlily/DalleMini") print("calling interface",text) img=dalle(text) #img=dalle.fns[0].fn(seed,psi) #header, encoded = img.split(",", 1) #data = b64decode(encoded) #image = Image.open(io.BytesIO(data)) return img #gfpgan=gr.Interface.load("spaces/akhaliq/GFPGAN") #img2=dalle(image) #return img2 demo = gr.Blocks() with demo: gr.Markdown("