ovi054 commited on
Commit
0a68816
·
verified ·
1 Parent(s): 152b5cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,8 +23,8 @@ def upscale_image(url):
23
  img = Image.open(BytesIO(img_data))
24
 
25
  # Save the converted image to a temporary file
26
- with tempfile.NamedTemporaryFile(delete=False, suffix='.png') as temp_file:
27
- img.save(temp_file, format="PNG")
28
  temp_file_path = temp_file.name
29
 
30
  # Optionally, delete the temp file after processing (you can remove this line if not needed)
 
23
  img = Image.open(BytesIO(img_data))
24
 
25
  # Save the converted image to a temporary file
26
+ with tempfile.NamedTemporaryFile(delete=False, suffix='.jpg') as temp_file:
27
+ img.save(temp_file, format="JPEG", quality=95)
28
  temp_file_path = temp_file.name
29
 
30
  # Optionally, delete the temp file after processing (you can remove this line if not needed)