LAP-DEV commited on
Commit
0314911
·
verified ·
1 Parent(s): a518e11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -97,7 +97,7 @@ class App:
97
  nllb_params = translation_params["nllb"]
98
 
99
  with gr.Row():
100
- with gr.Column(scale=4):
101
  with gr.Row():
102
  dd_model = gr.Dropdown(choices=self.whisper_inf.available_models, value=whisper_params["model_size"],label="Model", info="Larger models increase transcription quality, but reduce performance", interactive=True)
103
  dd_lang = gr.Dropdown(choices=["Automatic Detection"] + self.whisper_inf.available_langs,value=whisper_params["lang"], label="Language", info="If the language is known upfront, always set it manually", interactive=True)
@@ -105,15 +105,15 @@ class App:
105
  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)
106
  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)
107
  with gr.Column(scale=1):
108
- with gr.Row():
109
- dd_file_format = gr.Dropdown(choices=["TXT","SRT"], value="TXT", label="Output format", interactive=True,visible=False)
110
- cb_timestamp = gr.Checkbox(value=whisper_params["add_timestamp"], label="Add timestamp to output file",interactive=True, visible=False)
111
- rb_preview_format = gr.Radio(["text", "text with timestamps", "csv"], value="text",label="Output preview format", interactive=True)
112
  with gr.Row():
113
  cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English", info="Translate using OpenAI Whisper's built-in module",interactive=True)
114
- #with gr.Row():
115
  cb_translate_output = gr.Checkbox(value=translation_params["translate_output"], label="Translate to selected language", info="Translate using Facebook's NLLB",interactive=True)
116
-
 
 
 
 
 
117
  with gr.Accordion("Speaker diarization", open=False, visible=True):
118
  cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Use diarization",interactive=True)
119
  tb_hf_token = gr.Text(label="Token", value=diarization_params["hf_token"],info="An access token is required to use diarization & can be created [here](https://hf.co/settings/tokens). If not done yet for your account, you need to accept the terms & conditions of [diarization](https://huggingface.co/pyannote/speaker-diarization-3.1) & [segmentation](https://huggingface.co/pyannote/segmentation-3.0)")
 
97
  nllb_params = translation_params["nllb"]
98
 
99
  with gr.Row():
100
+ with gr.Column(scale=3):
101
  with gr.Row():
102
  dd_model = gr.Dropdown(choices=self.whisper_inf.available_models, value=whisper_params["model_size"],label="Model", info="Larger models increase transcription quality, but reduce performance", interactive=True)
103
  dd_lang = gr.Dropdown(choices=["Automatic Detection"] + self.whisper_inf.available_langs,value=whisper_params["lang"], label="Language", info="If the language is known upfront, always set it manually", interactive=True)
 
105
  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)
106
  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)
107
  with gr.Column(scale=1):
 
 
 
 
108
  with gr.Row():
109
  cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English", info="Translate using OpenAI Whisper's built-in module",interactive=True)
 
110
  cb_translate_output = gr.Checkbox(value=translation_params["translate_output"], label="Translate to selected language", info="Translate using Facebook's NLLB",interactive=True)
111
+ with gr.Column(scale=1):
112
+ with gr.Row():
113
+ dd_file_format = gr.Dropdown(choices=["TXT","SRT"], value="TXT", label="Output format", interactive=True,visible=False)
114
+ dd_preview_format = gr.Dropdown(choices=["text", "text with timestamps", "csv"], value="text",label="Output preview format", interactive=True)
115
+ cb_timestamp = gr.Checkbox(value=whisper_params["add_timestamp"], label="Add timestamp to output file",interactive=True)
116
+
117
  with gr.Accordion("Speaker diarization", open=False, visible=True):
118
  cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Use diarization",interactive=True)
119
  tb_hf_token = gr.Text(label="Token", value=diarization_params["hf_token"],info="An access token is required to use diarization & can be created [here](https://hf.co/settings/tokens). If not done yet for your account, you need to accept the terms & conditions of [diarization](https://huggingface.co/pyannote/speaker-diarization-3.1) & [segmentation](https://huggingface.co/pyannote/segmentation-3.0)")