Spaces:
Runtime error
Runtime error
ver 1.6
Browse files
app.py
CHANGED
@@ -242,23 +242,24 @@ with gr.Blocks(css=css) as demo:
|
|
242 |
)
|
243 |
with gr.Row(elem_id="container"):
|
244 |
inp = gr.File(
|
245 |
-
label="Upload SRT files",
|
246 |
-
file_count="multiple",
|
247 |
-
type="filepath",
|
|
|
248 |
height=600
|
249 |
)
|
250 |
out = gr.File(
|
251 |
label="Generated Audio Files",
|
252 |
file_count="multiple",
|
253 |
type="filepath",
|
254 |
-
height=600
|
255 |
)
|
256 |
|
257 |
btn = gr.Button("Generate")
|
258 |
download_btn = gr.Button("Download All")
|
259 |
|
260 |
btn.click(fn=srt_to_audio_multi, inputs=inp, outputs=out)
|
261 |
-
download_btn.click(fn=download_all, inputs=out, outputs="
|
262 |
|
263 |
if __name__ == "__main__":
|
264 |
demo.launch()
|
|
|
242 |
)
|
243 |
with gr.Row(elem_id="container"):
|
244 |
inp = gr.File(
|
245 |
+
label="Upload SRT files",
|
246 |
+
file_count="multiple",
|
247 |
+
type="filepath",
|
248 |
+
file_types=["srt"],
|
249 |
height=600
|
250 |
)
|
251 |
out = gr.File(
|
252 |
label="Generated Audio Files",
|
253 |
file_count="multiple",
|
254 |
type="filepath",
|
255 |
+
height=600,
|
256 |
)
|
257 |
|
258 |
btn = gr.Button("Generate")
|
259 |
download_btn = gr.Button("Download All")
|
260 |
|
261 |
btn.click(fn=srt_to_audio_multi, inputs=inp, outputs=out)
|
262 |
+
download_btn.click(fn=download_all, inputs=out, outputs=gr.File(label="Download ZIP"))
|
263 |
|
264 |
if __name__ == "__main__":
|
265 |
demo.launch()
|