Geek7 commited on
Commit
cca658c
·
verified ·
1 Parent(s): 1e1eeeb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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='JPEG')
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/jpeg')
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__":