bram-w commited on
Commit
dfa6c0a
1 Parent(s): 6f8e782

keep quality

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -25,7 +25,7 @@ def local_edict(x, source_text, edit_text,
25
 
26
  def encode_image(image):
27
  buffered = BytesIO()
28
- image.save(buffered, format="JPEG")
29
  buffered.seek(0)
30
 
31
  return buffered
@@ -75,4 +75,4 @@ iface = gr.Interface(fn=edict, inputs=["image",
75
  gr.Slider(0, 10, value=3, step=0.5),
76
  ],
77
  outputs="image")
78
- iface.launch()
 
25
 
26
  def encode_image(image):
27
  buffered = BytesIO()
28
+ image.save(buffered, format="JPEG", quality='keep')
29
  buffered.seek(0)
30
 
31
  return buffered
 
75
  gr.Slider(0, 10, value=3, step=0.5),
76
  ],
77
  outputs="image")
78
+ iface.launch()