Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -46,10 +46,10 @@ def optimize_image(image, png_optimize, jpeg_quality, jpeg_resolution, webp_qual
|
|
46 |
|
47 |
# Retornar las imágenes optimizadas, tamaños y rutas para descarga
|
48 |
return [
|
49 |
-
lossless_img, f"Sin pérdida: {lossless_size:.2f} KB (diferencia: {-lossless_diff:.2f} KB)", lossless_output_path,
|
50 |
-
lossy_img, f"Con pérdida: {lossy_size:.2f} KB (diferencia: {-lossy_diff:.2f} KB)", lossy_output_path,
|
51 |
reduced_img, f"Reducción de resolución: {reduced_size:.2f} KB \n(diferencia: {-reduced_diff:.2f} KB)", reduced_output_path,
|
52 |
-
webp_lossy_img, f"WebP con pérdida: {webp_lossy_size:.2f} KB (diferencia: {-webp_lossy_diff:.2f} KB)", webp_lossy_output_path
|
53 |
]
|
54 |
|
55 |
with gr.Blocks() as demo:
|
|
|
46 |
|
47 |
# Retornar las imágenes optimizadas, tamaños y rutas para descarga
|
48 |
return [
|
49 |
+
lossless_img, f"Sin pérdida: {lossless_size:.2f} KB \n(diferencia: {-lossless_diff:.2f} KB)", lossless_output_path,
|
50 |
+
lossy_img, f"Con pérdida: {lossy_size:.2f} KB \n(diferencia: {-lossy_diff:.2f} KB)", lossy_output_path,
|
51 |
reduced_img, f"Reducción de resolución: {reduced_size:.2f} KB \n(diferencia: {-reduced_diff:.2f} KB)", reduced_output_path,
|
52 |
+
webp_lossy_img, f"WebP con pérdida: {webp_lossy_size:.2f} KB \n(diferencia: {-webp_lossy_diff:.2f} KB)", webp_lossy_output_path
|
53 |
]
|
54 |
|
55 |
with gr.Blocks() as demo:
|