File size: 337 Bytes
a0c661f
 
 
 
ea4ade0
3af0990
a0c661f
 
d8715a2
9bcd82e
1
2
3
4
5
6
7
8
9
10
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")
    image = pipe(sets, guidance_scale=10).images[0]  
    return image

iface = gr.Interface(fn=draw, inputs="text", outputs="image")
iface.launch()