Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
def
|
4 |
-
|
|
|
|
|
5 |
|
6 |
-
iface = gr.Interface(fn=greet, inputs="text", outputs="
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from diffusers import StableDiffusionPipeline
|
3 |
|
4 |
+
def draw(sets):
|
5 |
+
pipe = StableDiffusionPipeline.from_pretrained("IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-EN-v0.1").to("cuda")
|
6 |
+
image = pipe(prompt, guidance_scale=10).images[0]
|
7 |
+
return image
|
8 |
|
9 |
+
iface = gr.Interface(fn=greet, inputs="text", outputs="image")
|
10 |
iface.launch()
|