Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ async def generate_image(prompt):
|
|
| 13 |
# Generate an image based on the prompt
|
| 14 |
output = await asyncio.to_thread(model, prompt=prompt, num_inference_steps=1, guidance_scale=0.0)
|
| 15 |
print(f"Model output: {output}")
|
| 16 |
-
|
| 17 |
# Check if the model returned images
|
| 18 |
if isinstance(output.images, list) and len(output.images) > 0:
|
| 19 |
image = output.images[0]
|
|
|
|
| 13 |
# Generate an image based on the prompt
|
| 14 |
output = await asyncio.to_thread(model, prompt=prompt, num_inference_steps=1, guidance_scale=0.0)
|
| 15 |
print(f"Model output: {output}")
|
| 16 |
+
return output
|
| 17 |
# Check if the model returned images
|
| 18 |
if isinstance(output.images, list) and len(output.images) > 0:
|
| 19 |
image = output.images[0]
|