Update app.py
Browse files
app.py
CHANGED
@@ -301,10 +301,10 @@ class App:
|
|
301 |
with gr.Tabs():
|
302 |
with gr.TabItem("Audio upload/record"): # tab1
|
303 |
|
304 |
-
with gr.
|
305 |
-
with gr.
|
306 |
input_file = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True)
|
307 |
-
with gr.
|
308 |
input_file_multi = gr.Files(label="Upload one or more audio/video files here", elem_id="audio_input", type='filepath', file_count="multiple", file_types=["audio","video"])
|
309 |
|
310 |
tb_input_folder = gr.Textbox(label="Input Folder Path (Optional)",
|
@@ -327,10 +327,7 @@ 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 |
-
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(),
|
|
|
301 |
with gr.Tabs():
|
302 |
with gr.TabItem("Audio upload/record"): # tab1
|
303 |
|
304 |
+
with gr.Row():
|
305 |
+
with gr.Column():
|
306 |
input_file = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True)
|
307 |
+
with gr.Column():
|
308 |
input_file_multi = gr.Files(label="Upload one or more audio/video files here", elem_id="audio_input", type='filepath', file_count="multiple", file_types=["audio","video"])
|
309 |
|
310 |
tb_input_folder = gr.Textbox(label="Input Folder Path (Optional)",
|
|
|
327 |
files_subtitles = gr.Files(label="Output data", interactive=False, file_count="multiple")
|
328 |
# btn_openfolder = gr.Button('📂', scale=1)
|
329 |
|
330 |
+
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]
|
|
|
|
|
|
|
331 |
|
332 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
333 |
inputs=params + whisper_params.as_list(),
|