3mrology commited on
Commit
5acc1ac
1 Parent(s): 6c7e6ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,7 +1,9 @@
1
  import gradio as gr
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="image")
7
  iface.launch()
 
1
  import gradio as gr
2
+ from diffusers import DiffusionPipeline
3
 
4
+ pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
5
+ def generate(prompt):
6
+ return pipeline(prompt)
7
 
8
+ iface = gr.Interface(fn=generate, inputs="text", outputs="image")
9
  iface.launch()