Update app.py
Browse files
app.py
CHANGED
|
@@ -27,11 +27,11 @@ def generate_image():
|
|
| 27 |
|
| 28 |
# Save the generated image to a BytesIO object
|
| 29 |
img_byte_arr = io.BytesIO()
|
| 30 |
-
generated_image.save(img_byte_arr, format='
|
| 31 |
img_byte_arr.seek(0) # Move the cursor to the beginning of the BytesIO object
|
| 32 |
|
| 33 |
# Send the generated image back to the client
|
| 34 |
-
return send_file(img_byte_arr, mimetype='image/
|
| 35 |
|
| 36 |
|
| 37 |
if __name__ == "__main__":
|
|
|
|
| 27 |
|
| 28 |
# Save the generated image to a BytesIO object
|
| 29 |
img_byte_arr = io.BytesIO()
|
| 30 |
+
generated_image.save(img_byte_arr, format='PNG')
|
| 31 |
img_byte_arr.seek(0) # Move the cursor to the beginning of the BytesIO object
|
| 32 |
|
| 33 |
# Send the generated image back to the client
|
| 34 |
+
return send_file(img_byte_arr, mimetype='image/png')
|
| 35 |
|
| 36 |
|
| 37 |
if __name__ == "__main__":
|