ernestchu commited on
Commit
34b341d
1 Parent(s): ded337a

turnoff denoising when yt or file

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -104,9 +104,9 @@ with gr.Blocks() as demo:
104
  audio_file_box = gr.Audio(label='Audio sample', type='filepath')
105
  denoise_box = gr.Checkbox(label='Speech enhancement (should be off for music)', value=True)
106
 
107
- rec_box.change(lambda: [None] * 2, outputs=[audio_file_box, yt_url_box])
108
- audio_file_box.change(lambda: [None] * 2, outputs=[rec_box, yt_url_box])
109
- yt_url_box.input(lambda: [None] * 2, outputs=[rec_box, audio_file_box])
110
 
111
  speed_box = gr.Slider(label='Playback speed', minimum=0.25, maximum=2, value=1)
112
  with gr.Accordion('Fine-grained settings', open=False):
 
104
  audio_file_box = gr.Audio(label='Audio sample', type='filepath')
105
  denoise_box = gr.Checkbox(label='Speech enhancement (should be off for music)', value=True)
106
 
107
+ rec_box.change(lambda: [None, None, True], outputs=[audio_file_box, yt_url_box, denoise_box])
108
+ audio_file_box.change(lambda: [None, None, False], outputs=[rec_box, yt_url_box, denoise_box])
109
+ yt_url_box.input(lambda: [None, None, False], outputs=[rec_box, audio_file_box, denoise_box])
110
 
111
  speed_box = gr.Slider(label='Playback speed', minimum=0.25, maximum=2, value=1)
112
  with gr.Accordion('Fine-grained settings', open=False):