Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,14 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
-
|
|
|
|
| 5 |
|
| 6 |
|
| 7 |
iface = gr.Interface(fn=greet, inputs="text", outputs="image")
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from diffusers import DiffusionPipeline
|
| 3 |
+
|
| 4 |
+
pipeline = DiffusionPipeline.from_pretrained("anton-l/ddpm-ema-flowers-64")
|
| 5 |
+
|
| 6 |
+
generator.to("cuda")
|
| 7 |
+
|
| 8 |
|
| 9 |
def greet(name):
|
| 10 |
+
image = generator().images[0]
|
| 11 |
+
return image
|
| 12 |
|
| 13 |
|
| 14 |
iface = gr.Interface(fn=greet, inputs="text", outputs="image")
|