Update app.py
Browse files
app.py
CHANGED
@@ -100,21 +100,18 @@ class App:
|
|
100 |
with gr.Row():
|
101 |
dd_model = gr.Dropdown(choices=self.whisper_inf.available_models, value=whisper_params["model_size"],label="Model", info="Larger models will increase the quality of the transcription, but reduce performance")
|
102 |
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")
|
103 |
-
|
104 |
-
with gr.Row():
|
105 |
-
cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English",interactive=True)
|
106 |
cb_timestamp = gr.Checkbox(value=whisper_params["add_timestamp"], label="Add timestamp to output file",interactive=True, visible=True)
|
107 |
#dd_file_format = gr.Dropdown(choices=["SRT", "WebVTT", "txt"], value="SRT", label="File Format")
|
108 |
dd_file_format = gr.Dropdown(choices=["TXT","SRT"], value="TXT", label="Output format", visible=False, info="Output preview format")
|
109 |
|
110 |
# Parameters for translation
|
111 |
with gr.Row():
|
112 |
-
|
113 |
-
|
114 |
-
#dd_target_lang = gr.Dropdown(
|
115 |
-
dd_target_lang = gr.Dropdown(
|
116 |
-
|
117 |
-
|
118 |
# with gr.Accordion("Speaker diarization", open=False, visible=True):
|
119 |
# cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"], label="Use diarization",interactive=True)
|
120 |
# tb_hf_token = gr.Text(label="Token", value=diarization_params["hf_token"],info="Required to use diarization")
|
|
|
100 |
with gr.Row():
|
101 |
dd_model = gr.Dropdown(choices=self.whisper_inf.available_models, value=whisper_params["model_size"],label="Model", info="Larger models will increase the quality of the transcription, but reduce performance")
|
102 |
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")
|
103 |
+
cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English",interactive=True, visible=False)
|
|
|
|
|
104 |
cb_timestamp = gr.Checkbox(value=whisper_params["add_timestamp"], label="Add timestamp to output file",interactive=True, visible=True)
|
105 |
#dd_file_format = gr.Dropdown(choices=["SRT", "WebVTT", "txt"], value="SRT", label="File Format")
|
106 |
dd_file_format = gr.Dropdown(choices=["TXT","SRT"], value="TXT", label="Output format", visible=False, info="Output preview format")
|
107 |
|
108 |
# Parameters for translation
|
109 |
with gr.Row():
|
110 |
+
cb_translate_output = gr.Checkbox(value=False, label="Translate output",interactive=True)
|
111 |
+
dd_translate_model = gr.Dropdown(choices=self.nllb_inf.available_models, value=nllb_params["model_size"],label="Model")
|
112 |
+
#dd_target_lang = gr.Dropdown(choices=self.nllb_inf.available_target_langs, value=nllb_params["target_lang"],label="Target Language")
|
113 |
+
dd_target_lang = gr.Dropdown(choices=["English","Dutch","French","German"], value=nllb_params["target_lang"],label="Target Language")
|
114 |
+
|
|
|
115 |
# with gr.Accordion("Speaker diarization", open=False, visible=True):
|
116 |
# cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"], label="Use diarization",interactive=True)
|
117 |
# tb_hf_token = gr.Text(label="Token", value=diarization_params["hf_token"],info="Required to use diarization")
|