Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -143,7 +143,9 @@ async def generate_new_img(hex_code: str, prompt: str = Query(..., description="
|
|
| 143 |
image_data = io.BytesIO()
|
| 144 |
image.save(image_data, format="PNG")
|
| 145 |
image_data.seek(0)
|
| 146 |
-
|
|
|
|
|
|
|
| 147 |
return StreamingResponse(image_data, media_type="image/png")
|
| 148 |
except Exception as e:
|
| 149 |
raise HTTPException(status_code=500, detail=str(e))
|
|
|
|
| 143 |
image_data = io.BytesIO()
|
| 144 |
image.save(image_data, format="PNG")
|
| 145 |
image_data.seek(0)
|
| 146 |
+
|
| 147 |
+
global generated_image
|
| 148 |
+
generated_image = image
|
| 149 |
return StreamingResponse(image_data, media_type="image/png")
|
| 150 |
except Exception as e:
|
| 151 |
raise HTTPException(status_code=500, detail=str(e))
|