Spaces:
Runtime error
Runtime error
Streaming
Browse files
app.py
CHANGED
|
@@ -75,7 +75,7 @@ def generate_image(prompt: str, progress=gr.Progress(track_tqdm=True)):
|
|
| 75 |
image = pipeline(prompt, num_inference_steps=4).images[0]
|
| 76 |
elapsed = -(t0 - (t0 := datetime.now()))
|
| 77 |
images += [(image, f'{elapsed.total_seconds():.2f}s')]
|
| 78 |
-
|
| 79 |
|
| 80 |
|
| 81 |
gr.Interface(generate_image, gr.Text(), gr.Gallery(rows=3, columns=3, height='60vh')).launch()
|
|
|
|
| 75 |
image = pipeline(prompt, num_inference_steps=4).images[0]
|
| 76 |
elapsed = -(t0 - (t0 := datetime.now()))
|
| 77 |
images += [(image, f'{elapsed.total_seconds():.2f}s')]
|
| 78 |
+
yield images
|
| 79 |
|
| 80 |
|
| 81 |
gr.Interface(generate_image, gr.Text(), gr.Gallery(rows=3, columns=3, height='60vh')).launch()
|