import gradio as gr from diffusers import StableDiffusionPipeline def draw(sets): pipe = StableDiffusionPipeline.from_pretrained("IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-EN-v0.1").to("cuda") image = pipe(prompt, guidance_scale=10).images[0] return image iface = gr.Interface(fn=greet, inputs="text", outputs="image") iface.launch()