LAP-DEV commited on
Commit
05c2a91
·
verified ·
1 Parent(s): cf46631

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -106,7 +106,7 @@ class App:
106
  input_file_multi = gr.Files(label="Upload one or more audio/video files here", elem_id="multi_input", type='filepath', file_count="multiple", allow_reordering=True, file_types=["audio","video"], visible=False, interactive=True)
107
 
108
  with gr.Row():
109
- with gr.Column():
110
  with gr.Row():
111
  model_list = self.whisper_inf.available_models if len(whisper_params["model_list"]) == 0 else whisper_params["model_list"]
112
  dd_model = gr.Dropdown(choices=model_list, value=whisper_params["model_size"],label="Model", info="Larger models increase transcription quality, but reduce performance", interactive=True)
@@ -114,14 +114,15 @@ class App:
114
  with gr.Row():
115
  dd_translate_model = gr.Dropdown(choices=self.nllb_inf.available_models, value=nllb_params["model_size"],label="Model", info="Model used for translation", interactive=True)
116
  dd_target_lang = gr.Dropdown(choices=["English","Dutch","French","German"], value=nllb_params["target_lang"],label="Language", info="Language used for output translation", interactive=True)
117
- with gr.Column():
118
  cb_timestamp_preview = gr.Checkbox(value=whisper_params["add_timestamp_preview"],label="Add timestamp to preview", interactive=True)
119
  cb_timestamp_file = gr.Checkbox(value=whisper_params["add_timestamp_file"], label="Add timestamp to output", interactive=True)
120
- with gr.Row():
121
- cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Speaker diarization", info="Token required for diarization",interactive=True)
122
- with gr.Row():
123
- cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English", info="Translate using OpenAI Whisper's built-in module",interactive=True)
124
- cb_translate_output = gr.Checkbox(value=translation_params["translate_output"], label="Translate to selected language", info="Translate using Facebook's NLLB",interactive=True)
 
125
 
126
  with gr.Accordion("Options", open=False, visible=True):
127
 
 
106
  input_file_multi = gr.Files(label="Upload one or more audio/video files here", elem_id="multi_input", type='filepath', file_count="multiple", allow_reordering=True, file_types=["audio","video"], visible=False, interactive=True)
107
 
108
  with gr.Row():
109
+ with gr.Column(scale=3):
110
  with gr.Row():
111
  model_list = self.whisper_inf.available_models if len(whisper_params["model_list"]) == 0 else whisper_params["model_list"]
112
  dd_model = gr.Dropdown(choices=model_list, value=whisper_params["model_size"],label="Model", info="Larger models increase transcription quality, but reduce performance", interactive=True)
 
114
  with gr.Row():
115
  dd_translate_model = gr.Dropdown(choices=self.nllb_inf.available_models, value=nllb_params["model_size"],label="Model", info="Model used for translation", interactive=True)
116
  dd_target_lang = gr.Dropdown(choices=["English","Dutch","French","German"], value=nllb_params["target_lang"],label="Language", info="Language used for output translation", interactive=True)
117
+ with gr.Column(scale=2):
118
  cb_timestamp_preview = gr.Checkbox(value=whisper_params["add_timestamp_preview"],label="Add timestamp to preview", interactive=True)
119
  cb_timestamp_file = gr.Checkbox(value=whisper_params["add_timestamp_file"], label="Add timestamp to output", interactive=True)
120
+ with gr.Column():
121
+ with gr.Row():
122
+ cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Speaker diarization", info="Token required for diarization",interactive=True)
123
+ with gr.Row():
124
+ cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English", info="Translate using OpenAI Whisper's built-in module",interactive=True)
125
+ cb_translate_output = gr.Checkbox(value=translation_params["translate_output"], label="Translate to selected language", info="Translate using Facebook's NLLB",interactive=True)
126
 
127
  with gr.Accordion("Options", open=False, visible=True):
128