Spaces:
Running
Running
Update app.py
Browse files
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='.
|
27 |
-
img.save(temp_file, format="
|
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)
|