Update app.py
Browse files
app.py
CHANGED
@@ -301,7 +301,7 @@ class App:
|
|
301 |
with gr.Tabs():
|
302 |
with gr.TabItem("Audio upload/record"): # tab1
|
303 |
|
304 |
-
with gr.Tabs():
|
305 |
with gr.TabItem("Process a single file"):
|
306 |
input_file = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True)
|
307 |
with gr.TabItem("Process multiple files"):
|
@@ -327,7 +327,11 @@ class App:
|
|
327 |
files_subtitles = gr.Files(label="Output data", interactive=False, file_count="multiple")
|
328 |
# btn_openfolder = gr.Button('📂', scale=1)
|
329 |
|
330 |
-
|
|
|
|
|
|
|
|
|
331 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
332 |
inputs=params + whisper_params.as_list(),
|
333 |
outputs=[tb_indicator, files_subtitles, tb_info])
|
|
|
301 |
with gr.Tabs():
|
302 |
with gr.TabItem("Audio upload/record"): # tab1
|
303 |
|
304 |
+
with gr.Tabs() as TabSingleOrMulti:
|
305 |
with gr.TabItem("Process a single file"):
|
306 |
input_file = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True)
|
307 |
with gr.TabItem("Process multiple files"):
|
|
|
327 |
files_subtitles = gr.Files(label="Output data", interactive=False, file_count="multiple")
|
328 |
# btn_openfolder = gr.Button('📂', scale=1)
|
329 |
|
330 |
+
if TabSingleOrMulti==1:
|
331 |
+
params = [input_file, tb_input_folder, dd_file_format, cb_timestamp_file, cb_translate_output, dd_translate_model, dd_target_lang, cb_timestamp_preview]
|
332 |
+
if TabSingleOrMulti==2:
|
333 |
+
params = [input_file_multi, tb_input_folder, dd_file_format, cb_timestamp_file, cb_translate_output, dd_translate_model, dd_target_lang, cb_timestamp_preview]
|
334 |
+
|
335 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
336 |
inputs=params + whisper_params.as_list(),
|
337 |
outputs=[tb_indicator, files_subtitles, tb_info])
|