LAP-DEV commited on
Commit
28c3d88
·
verified ·
1 Parent(s): 57d00cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -9
app.py CHANGED
@@ -108,7 +108,7 @@ class App:
108
  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)
109
 
110
  with gr.Row():
111
- with gr.Column(scale=4):
112
  with gr.Row():
113
  model_list = self.whisper_inf.available_models if len(whisper_params["model_list"]) == 0 else whisper_params["model_list"]
114
  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)
@@ -116,20 +116,15 @@ class App:
116
  with gr.Row():
117
  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)
118
  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)
119
- with gr.Column(scale=1):
120
  with gr.Row():
121
- cb_timestamp_preview = gr.Checkbox(value=whisper_params["add_timestamp_preview"],label="Add timestamp to preview", interactive=True)
122
  with gr.Row():
123
  cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Speaker diarization", info="Token required for diarization",interactive=True)
124
  with gr.Row():
125
  cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English", info="Translate using OpenAI Whisper's built-in module",interactive=True)
126
  cb_translate_output = gr.Checkbox(value=translation_params["translate_output"], label="Translate to selected language", info="Translate using Facebook's NLLB",interactive=True)
127
-
128
- with gr.Row():
129
- cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Speaker diarization", info="Token required for diarization",interactive=True)
130
- cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English", info="Translate using OpenAI Whisper's built-in module",interactive=True)
131
- cb_translate_output = gr.Checkbox(value=translation_params["translate_output"], label="Translate to selected language", info="Translate using Facebook's NLLB",interactive=True)
132
-
133
  with gr.Accordion("Options & preprocessing filters", open=False, visible=True):
134
 
135
  with gr.Accordion("Diarization", open=False, visible=True):
 
108
  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)
109
 
110
  with gr.Row():
111
+ with gr.Column(scale=3):
112
  with gr.Row():
113
  model_list = self.whisper_inf.available_models if len(whisper_params["model_list"]) == 0 else whisper_params["model_list"]
114
  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)
 
116
  with gr.Row():
117
  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)
118
  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)
119
+ with gr.Column(scale=2):
120
  with gr.Row():
121
+ cb_timestamp_preview = gr.Checkbox(value=whisper_params["add_timestamp_preview"],label="Preview with speaker timestamps", interactive=True)
122
  with gr.Row():
123
  cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Speaker diarization", info="Token required for diarization",interactive=True)
124
  with gr.Row():
125
  cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English", info="Translate using OpenAI Whisper's built-in module",interactive=True)
126
  cb_translate_output = gr.Checkbox(value=translation_params["translate_output"], label="Translate to selected language", info="Translate using Facebook's NLLB",interactive=True)
127
+
 
 
 
 
 
128
  with gr.Accordion("Options & preprocessing filters", open=False, visible=True):
129
 
130
  with gr.Accordion("Diarization", open=False, visible=True):