minDalle_GFPGAN / app.py
Logan Zoellner
initial commit
b2649ae
raw
history blame
916 Bytes
from asyncio import constants
import gradio as gr
def generate_image(text):
dalle = gr.Interface.load("spaces/kuprel/min-dalle")
print("calling interface",text)
img=dalle(text)
gfpgan=gr.Interface.load("spaces/akhaliq/GFPGAN")
img2=dalle(img)
return img2
demo = gr.Blocks()
with demo:
gr.Markdown("<h1><center>StyleGan-Human + PIFu </center></h1>")
gr.Markdown(
"create an image with min-dalle then fix faces with grpgan"
)
with gr.Row():
b0 = gr.Button("generate image")
with gr.Row():
text=gr.Text(default="three pigs in a trenchcoat", label='Seed')
#outputImage = gr.Image(label="portrait",type="filepath", shape=(256,256))
output_image = gr.outputs.Image(type="filepath", label='Output')
b0.click(generate_image,inputs=[text],outputs=[output_image])
demo.launch(enable_queue=True, debug=True)