Hev832 commited on
Commit
ab6112a
1 Parent(s): e01df81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -285,11 +285,7 @@ with gr.Blocks(title="Hex RVC", theme=gr.themes.Default(primary_hue="red", secon
285
 
286
 
287
 
288
- refresh_btn = gr.Button("Refresh Audio")
289
-
290
- refresh_btn.click(refresh_audio_list, outputs=SOUND_PATH)
291
-
292
- refresh_btn.click(refresh_folders, outputs=MODEL_NAME)
293
 
294
  with gr.Accordion("Conversion Settings"):
295
  with gr.Row():
@@ -325,9 +321,14 @@ with gr.Blocks(title="Hex RVC", theme=gr.themes.Default(primary_hue="red", secon
325
 
326
  output_audio = gr.Audio(label="Generated Audio", type='filepath')
327
 
 
328
  run_button = gr.Button("Convert")
329
 
330
  #ref_btn.click(update_models_list, None, outputs=MODEL_NAME)
 
 
 
 
331
  run_button.click(
332
  process_audio,
333
  inputs=[MODEL_NAME, SOUND_PATH, F0_CHANGE, F0_METHOD, MIN_PITCH, MAX_PITCH, CREPE_HOP_LENGTH, INDEX_RATE,
 
285
 
286
 
287
 
288
+
 
 
 
 
289
 
290
  with gr.Accordion("Conversion Settings"):
291
  with gr.Row():
 
321
 
322
  output_audio = gr.Audio(label="Generated Audio", type='filepath')
323
 
324
+ refresh_btn = gr.Button("Refresh")
325
  run_button = gr.Button("Convert")
326
 
327
  #ref_btn.click(update_models_list, None, outputs=MODEL_NAME)
328
+ refresh_btn.click(
329
+ lambda: (refresh_audio_list(), refresh_folders()),
330
+ outputs=[SOUND_PATH, MODEL_NAME]
331
+ )
332
  run_button.click(
333
  process_audio,
334
  inputs=[MODEL_NAME, SOUND_PATH, F0_CHANGE, F0_METHOD, MIN_PITCH, MAX_PITCH, CREPE_HOP_LENGTH, INDEX_RATE,