boroll2347 commited on
Commit
e0c76c0
·
verified ·
1 Parent(s): 35439ab

Set output image format to PNG for higher quality

Browse files

By default, Gradio `Image` and `Gallery` serve the output image recompressed to a terrible-quality WebP; setting the format explicitly to a lossless format avoids that behavior.

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -428,7 +428,8 @@ with gr.Blocks(css=css) as WeShop:
428
  type="pil",
429
  label="Result",
430
  elem_classes=["image-container", "hide-buttons"],
431
- interactive=False
 
432
  )
433
  with gr.Row():
434
  submit_button = gr.Button("Generate")
 
428
  type="pil",
429
  label="Result",
430
  elem_classes=["image-container", "hide-buttons"],
431
+ interactive=False,
432
+ format="png",
433
  )
434
  with gr.Row():
435
  submit_button = gr.Button("Generate")