import gradio as gr from diffusers import DiffusionPipeline generator = DiffusionPipeline.from_pretrained("anton-l/ddpm-ema-flowers-64") #generator = DiffusionPipeline.from_pretrained("google/ddpm-celebahq-256") #generator.to("cuda") def greet(name): image = generator().images[0] return image iface = gr.Interface(fn=greet, inputs="text", outputs="image") iface.launch()