hivecorp commited on
Commit
3fd612c
·
verified ·
1 Parent(s): fef1314

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -18
app.py CHANGED
@@ -99,11 +99,7 @@ async def create_demo():
99
 
100
  with gr.Column():
101
  output_audio = gr.Audio(label="Generated Audio", type="filepath")
102
- audio_download_button = gr.Button("Download Audio")
103
-
104
  output_srt = gr.File(label="Generated SRT", file_count="single")
105
- srt_download_button = gr.Button("Download SRT")
106
-
107
  warning_msg = gr.Markdown(label="Warning", visible=False)
108
 
109
  generate_button.click(
@@ -111,20 +107,6 @@ async def create_demo():
111
  inputs=[text_input, voice_dropdown, rate_slider, pitch_slider],
112
  outputs=[output_audio, output_srt, warning_msg]
113
  )
114
-
115
- audio_download_button.click(
116
- fn=lambda audio: audio,
117
- inputs=output_audio,
118
- outputs=None,
119
- _js="(function(audio) { if(audio) { window.open(audio); } })"
120
- )
121
-
122
- srt_download_button.click(
123
- fn=lambda srt: srt,
124
- inputs=output_srt,
125
- outputs=None,
126
- _js="(function(srt) { if(srt) { window.open(srt); } })"
127
- )
128
 
129
  return demo
130
 
 
99
 
100
  with gr.Column():
101
  output_audio = gr.Audio(label="Generated Audio", type="filepath")
 
 
102
  output_srt = gr.File(label="Generated SRT", file_count="single")
 
 
103
  warning_msg = gr.Markdown(label="Warning", visible=False)
104
 
105
  generate_button.click(
 
107
  inputs=[text_input, voice_dropdown, rate_slider, pitch_slider],
108
  outputs=[output_audio, output_srt, warning_msg]
109
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
 
111
  return demo
112