LAP-DEV commited on
Commit
dafdaba
·
verified ·
1 Parent(s): 2afe985

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -95,6 +95,13 @@ class App:
95
  translation_params = self.default_params["translation"]
96
  nllb_params = translation_params["nllb"]
97
 
 
 
 
 
 
 
 
98
  with gr.Row():
99
  with gr.Column(scale=4):
100
  with gr.Row():
@@ -260,6 +267,8 @@ class App:
260
  uvr_device=dd_uvr_device, uvr_model_size=dd_uvr_model_size, uvr_segment_size=nb_uvr_segment_size,
261
  uvr_save_file=cb_uvr_save_file, uvr_enable_offload=cb_uvr_enable_offload
262
  ),
 
 
263
  dd_file_format,
264
  cb_timestamp_file,
265
  cb_translate_output,
@@ -301,20 +310,13 @@ class App:
301
  with gr.Tabs():
302
  with gr.TabItem("Audio upload/record"): # tab1
303
 
304
- with gr.Row():
305
- with gr.Column(scale=1):
306
- input_multi = gr.Radio(["Single", "Multiple"], label="Process one or multiple files", value="Single")
307
- with gr.Column(scale=4):
308
- input_file = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True, visible=True, interactive=True)
309
- 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)
310
-
311
  tb_input_folder = gr.Textbox(label="Input Folder Path (Optional)",
312
  info="Optional: Specify the folder path where the input files are located, if you prefer to use local files instead of uploading them."
313
  " Leave this field empty if you do not wish to use a local path.",
314
  visible=self.args.colab,
315
  value="")
316
 
317
- whisper_params, dd_file_format, cb_timestamp_file, cb_translate_output, dd_translate_model, dd_target_lang, cb_timestamp_preview = self.create_whisper_parameters()
318
 
319
  with gr.Row():
320
  btn_run = gr.Button("Transcribe", variant="primary")
 
95
  translation_params = self.default_params["translation"]
96
  nllb_params = translation_params["nllb"]
97
 
98
+ with gr.Row():
99
+ with gr.Column(scale=1):
100
+ input_multi = gr.Radio(["Single", "Multiple"], label="Process one or multiple files", value="Single")
101
+ with gr.Column(scale=4):
102
+ input_file = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True, visible=True, interactive=True)
103
+ 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)
104
+
105
  with gr.Row():
106
  with gr.Column(scale=4):
107
  with gr.Row():
 
267
  uvr_device=dd_uvr_device, uvr_model_size=dd_uvr_model_size, uvr_segment_size=nb_uvr_segment_size,
268
  uvr_save_file=cb_uvr_save_file, uvr_enable_offload=cb_uvr_enable_offload
269
  ),
270
+ input_file,
271
+ input_file_multi,
272
  dd_file_format,
273
  cb_timestamp_file,
274
  cb_translate_output,
 
310
  with gr.Tabs():
311
  with gr.TabItem("Audio upload/record"): # tab1
312
 
 
 
 
 
 
 
 
313
  tb_input_folder = gr.Textbox(label="Input Folder Path (Optional)",
314
  info="Optional: Specify the folder path where the input files are located, if you prefer to use local files instead of uploading them."
315
  " Leave this field empty if you do not wish to use a local path.",
316
  visible=self.args.colab,
317
  value="")
318
 
319
+ whisper_params, input_file, input_file_multi, dd_file_format, cb_timestamp_file, cb_translate_output, dd_translate_model, dd_target_lang, cb_timestamp_preview = self.create_whisper_parameters()
320
 
321
  with gr.Row():
322
  btn_run = gr.Button("Transcribe", variant="primary")