Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -82,9 +82,9 @@ def process_images(image_files, enhance, scale, adjust_dpi, dpi, resize, width,
|
|
82 |
if resize:
|
83 |
original_image = resize_image(np.array(original_image), width, height)
|
84 |
|
85 |
-
# Save each image as JPEG
|
86 |
file_name = os.path.basename(image_file.name)
|
87 |
-
output_path = os.path.join(temp_dir,
|
88 |
original_image.save(output_path, format='JPEG')
|
89 |
processed_images.append(output_path)
|
90 |
|
@@ -122,3 +122,4 @@ iface = gr.Interface(
|
|
122 |
iface.launch(debug=True)
|
123 |
|
124 |
|
|
|
|
82 |
if resize:
|
83 |
original_image = resize_image(np.array(original_image), width, height)
|
84 |
|
85 |
+
# Save each image as JPEG, preserving the original filename
|
86 |
file_name = os.path.basename(image_file.name)
|
87 |
+
output_path = os.path.join(temp_dir, file_name)
|
88 |
original_image.save(output_path, format='JPEG')
|
89 |
processed_images.append(output_path)
|
90 |
|
|
|
122 |
iface.launch(debug=True)
|
123 |
|
124 |
|
125 |
+
|