helloWorld199 commited on
Commit
400af59
1 Parent(s): 7ad3572

Update src/webui.py

Browse files
Files changed (1) hide show
  1. src/webui.py +7 -0
src/webui.py CHANGED
@@ -10,6 +10,7 @@ import gradio as gr
10
 
11
  from main import song_cover_pipeline
12
  from my_utils import show_stored_files
 
13
 
14
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
15
 
@@ -243,11 +244,17 @@ if __name__ == '__main__':
243
  outputs=[pitch, main_gain, backup_gain, inst_gain, index_rate, filter_radius, rms_mix_rate,
244
  protect, f0_method, crepe_hop_length, pitch_all, reverb_rm_size, reverb_wet,
245
  reverb_dry, reverb_damping, output_format, ai_cover])
 
246
  with gr.Accordion('For Debug Purposes', open=False):
247
  with gr.Row():
248
  folder = gr.Text(label='folder')
249
  debug_button = gr.Button(value='Debug')
250
  debug_button.click(show_stored_files, inputs =[folder])
 
 
 
 
 
251
 
252
 
253
 
 
10
 
11
  from main import song_cover_pipeline
12
  from my_utils import show_stored_files
13
+ from my_utils import remove_files_and_folders
14
 
15
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
16
 
 
244
  outputs=[pitch, main_gain, backup_gain, inst_gain, index_rate, filter_radius, rms_mix_rate,
245
  protect, f0_method, crepe_hop_length, pitch_all, reverb_rm_size, reverb_wet,
246
  reverb_dry, reverb_damping, output_format, ai_cover])
247
+
248
  with gr.Accordion('For Debug Purposes', open=False):
249
  with gr.Row():
250
  folder = gr.Text(label='folder')
251
  debug_button = gr.Button(value='Debug')
252
  debug_button.click(show_stored_files, inputs =[folder])
253
+ with gr.Row():
254
+ clear_output = gr.Text()
255
+ clear_cache_button = gr.Button(value='Clear Gradio Cache')
256
+ clear_cache_button.click(remove_files_and_folders, inputs=["/tmp/gradio/"])
257
+
258
 
259
 
260