Spaces:
Sleeping
Sleeping
Commit ·
73e9040
1
Parent(s): 7d30adc
Add refresh button and GPU optimization for original repo
Browse files
app.py
CHANGED
|
@@ -287,10 +287,31 @@ with gr.Blocks(
|
|
| 287 |
"- Se aceptan formatos WAV o MP3"
|
| 288 |
)
|
| 289 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 290 |
train_btn.click(
|
| 291 |
fn=train_voice_model,
|
| 292 |
inputs=[train_audio, train_model_name],
|
| 293 |
outputs=[train_status, train_download],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
)
|
| 295 |
|
| 296 |
# Pestaña 2: Conversión
|
|
|
|
| 287 |
"- Se aceptan formatos WAV o MP3"
|
| 288 |
)
|
| 289 |
|
| 290 |
+
with gr.Accordion("Perfiles guardados", open=False):
|
| 291 |
+
clonacion_refresh_btn = gr.Button("🔄 Actualizar lista de perfiles", size="sm")
|
| 292 |
+
clonacion_models_table = gr.HTML(value=refresh_models())
|
| 293 |
+
|
| 294 |
train_btn.click(
|
| 295 |
fn=train_voice_model,
|
| 296 |
inputs=[train_audio, train_model_name],
|
| 297 |
outputs=[train_status, train_download],
|
| 298 |
+
).then(
|
| 299 |
+
fn=refresh_models,
|
| 300 |
+
outputs=[clonacion_models_table],
|
| 301 |
+
).then(
|
| 302 |
+
fn=refresh_models,
|
| 303 |
+
outputs=[models_table],
|
| 304 |
+
).then(
|
| 305 |
+
fn=lambda: gr.Dropdown(choices=get_model_choices()),
|
| 306 |
+
outputs=[convert_model],
|
| 307 |
+
).then(
|
| 308 |
+
fn=lambda: gr.Dropdown(choices=get_model_choices()),
|
| 309 |
+
outputs=[models_delete_name],
|
| 310 |
+
)
|
| 311 |
+
|
| 312 |
+
clonacion_refresh_btn.click(
|
| 313 |
+
fn=refresh_models,
|
| 314 |
+
outputs=[clonacion_models_table],
|
| 315 |
)
|
| 316 |
|
| 317 |
# Pestaña 2: Conversión
|