Vihang28 commited on
Commit
e2220ee
·
verified ·
1 Parent(s): 2ad3c5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -40,8 +40,8 @@ def show_error(text):
40
  else:
41
  return gr.update(visible=False), gr.update(visible=True)
42
 
43
- # def download_file(aud_file):
44
- # return aud_file
45
 
46
  title = "Voice-Cloning-Demo"
47
 
@@ -80,7 +80,7 @@ with gr.Blocks(css="footer {visibility: hidden}") as demo:
80
  download_button = gr.DownloadButton(label="Download Audio", value=None, visible=True)
81
  error_box = gr.Textbox(label="WARNING", value="Input box cannot be blank!!", visible=False, container=True)
82
 
83
- download_button.click()
84
  btn_clear.add(audio_output)
85
  btn.click(text_to_speech, inputs=[text_input, audio_input_mic, audio_input_file], outputs=audio_output)
86
  btn.click(show_error, text_input, [error_box, audio_output])
 
40
  else:
41
  return gr.update(visible=False), gr.update(visible=True)
42
 
43
+ def download_file(aud_file):
44
+ return aud_file
45
 
46
  title = "Voice-Cloning-Demo"
47
 
 
80
  download_button = gr.DownloadButton(label="Download Audio", value=None, visible=True)
81
  error_box = gr.Textbox(label="WARNING", value="Input box cannot be blank!!", visible=False, container=True)
82
 
83
+ download_button.click(download_file, file_path, download_button)
84
  btn_clear.add(audio_output)
85
  btn.click(text_to_speech, inputs=[text_input, audio_input_mic, audio_input_file], outputs=audio_output)
86
  btn.click(show_error, text_input, [error_box, audio_output])