Merlintxu commited on
Commit
3448532
1 Parent(s): 853d6f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -65,30 +65,32 @@ with gr.Blocks() as demo:
65
  with gr.Column():
66
  optimized_output1 = gr.Image(label="Optimización sin pérdida")
67
  png_optimize = gr.Checkbox(label="Optimizar PNG", value=True)
68
- optimized_size1 = gr.Text(value="", interactive=False, show_label=False)
69
  download_button1 = gr.Button("Descargar")
70
  download_file1 = gr.File(visible=False)
 
71
 
72
  with gr.Column():
73
  optimized_output2 = gr.Image(label="Optimización con pérdida (JPEG)")
74
  jpeg_quality = gr.Slider(label="Calidad JPEG", minimum=10, maximum=100, value=50, step=1)
75
- optimized_size2 = gr.Text(value="", interactive=False, show_label=False)
76
  download_button2 = gr.Button("Descargar")
77
  download_file2 = gr.File(visible=False)
78
-
 
79
  with gr.Column():
80
  optimized_output3 = gr.Image(label="Reducción de resolución (JPEG)")
81
  jpeg_resolution = gr.Slider(label="Resolución JPEG (%)", minimum=10, maximum=100, value=50, step=1)
82
- optimized_size3 = gr.Text(value="", interactive=False, show_label=False)
83
  download_button3 = gr.Button("Descargar")
84
  download_file3 = gr.File(visible=False)
 
 
85
 
86
  with gr.Column():
87
  optimized_output4 = gr.Image(label="Optimización WebP con pérdida")
88
  webp_quality = gr.Slider(label="Calidad WebP", minimum=10, maximum=100, value=50, step=1)
89
- optimized_size4 = gr.Text(value="", interactive=False, show_label=False)
90
  download_button4 = gr.Button("Descargar")
91
  download_file4 = gr.File(visible=False)
 
 
92
 
93
  # Conectar cada control a la función de optimización
94
  optimize_button.click(
 
65
  with gr.Column():
66
  optimized_output1 = gr.Image(label="Optimización sin pérdida")
67
  png_optimize = gr.Checkbox(label="Optimizar PNG", value=True)
 
68
  download_button1 = gr.Button("Descargar")
69
  download_file1 = gr.File(visible=False)
70
+ optimized_size1 = gr.Text(value="", interactive=False, show_label=False)
71
 
72
  with gr.Column():
73
  optimized_output2 = gr.Image(label="Optimización con pérdida (JPEG)")
74
  jpeg_quality = gr.Slider(label="Calidad JPEG", minimum=10, maximum=100, value=50, step=1)
 
75
  download_button2 = gr.Button("Descargar")
76
  download_file2 = gr.File(visible=False)
77
+ optimized_size2 = gr.Text(value="", interactive=False, show_label=False)
78
+
79
  with gr.Column():
80
  optimized_output3 = gr.Image(label="Reducción de resolución (JPEG)")
81
  jpeg_resolution = gr.Slider(label="Resolución JPEG (%)", minimum=10, maximum=100, value=50, step=1)
 
82
  download_button3 = gr.Button("Descargar")
83
  download_file3 = gr.File(visible=False)
84
+ optimized_size3 = gr.Text(value="", interactive=False, show_label=False)
85
+
86
 
87
  with gr.Column():
88
  optimized_output4 = gr.Image(label="Optimización WebP con pérdida")
89
  webp_quality = gr.Slider(label="Calidad WebP", minimum=10, maximum=100, value=50, step=1)
 
90
  download_button4 = gr.Button("Descargar")
91
  download_file4 = gr.File(visible=False)
92
+ optimized_size4 = gr.Text(value="", interactive=False, show_label=False)
93
+
94
 
95
  # Conectar cada control a la función de optimización
96
  optimize_button.click(