LAP-DEV commited on
Commit
b3cb225
·
verified ·
1 Parent(s): f0d2b0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -104,7 +104,7 @@ class App:
104
  with gr.Row():
105
  cb_timestamp_preview = gr.Checkbox(value=whisper_params["add_timestamp_preview"],label="Show preview with timestamps", interactive=True)
106
  cb_timestamp_file = gr.Checkbox(value=whisper_params["add_timestamp_file"], label="Add timestamp to filenames", interactive=True)
107
- with gr.Column(scale=3):
108
  input_file = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True, visible=True, interactive=True)
109
  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"], visible=False, interactive=True)
110
 
@@ -330,7 +330,10 @@ class App:
330
  files_subtitles = gr.Files(label="Output data", interactive=False, file_count="multiple")
331
  # btn_openfolder = gr.Button('📂', scale=1)
332
 
333
- params = [input_file, 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(),
 
104
  with gr.Row():
105
  cb_timestamp_preview = gr.Checkbox(value=whisper_params["add_timestamp_preview"],label="Show preview with timestamps", interactive=True)
106
  cb_timestamp_file = gr.Checkbox(value=whisper_params["add_timestamp_file"], label="Add timestamp to filenames", interactive=True)
107
+ with gr.Column(scale=4):
108
  input_file = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True, visible=True, interactive=True)
109
  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"], visible=False, interactive=True)
110
 
 
330
  files_subtitles = gr.Files(label="Output data", interactive=False, file_count="multiple")
331
  # btn_openfolder = gr.Button('📂', scale=1)
332
 
333
+ if input_multi == "Single":
334
+ params = [input_file, tb_input_folder, dd_file_format, cb_timestamp_file, cb_translate_output, dd_translate_model, dd_target_lang, cb_timestamp_preview]
335
+ else:
336
+ 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]
337
 
338
  btn_run.click(fn=self.whisper_inf.transcribe_file,
339
  inputs=params + whisper_params.as_list(),