Update app.py
Browse files
app.py
CHANGED
@@ -96,20 +96,19 @@ class App:
|
|
96 |
with gr.Row():
|
97 |
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")
|
98 |
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")
|
99 |
-
#dd_file_format = gr.Dropdown(choices=["SRT", "WebVTT", "txt"], value="SRT", label="File Format")
|
100 |
|
101 |
-
with gr.
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
|
114 |
with gr.Accordion("Advanced options", open=False, visible=True):
|
115 |
with gr.Accordion("Advanced diarization options", open=False, visible=True):
|
|
|
96 |
with gr.Row():
|
97 |
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")
|
98 |
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")
|
|
|
99 |
|
100 |
+
with gr.Row():
|
101 |
+
cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English",interactive=True)
|
102 |
+
cb_timestamp = gr.Checkbox(value=whisper_params["add_timestamp"], label="Add timestamp to output file",interactive=True, visible=True)
|
103 |
+
#dd_file_format = gr.Dropdown(choices=["SRT", "WebVTT", "txt"], value="SRT", label="File Format")
|
104 |
+
dd_file_format = gr.Dropdown(choices=["TXT","SRT"], value="TXT", label="Output format", visible=False, info="Output preview format")
|
105 |
+
|
106 |
+
with gr.Accordion("Speaker diarization", open=False, visible=True):
|
107 |
+
cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"], label="Use diarization",interactive=True)
|
108 |
+
tb_hf_token = gr.Text(label="Token", value=diarization_params["hf_token"],info="Required to use diarization")
|
109 |
+
gr.Markdown("""
|
110 |
+
An access token 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) and [segmentation](https://huggingface.co/pyannote/segmentation-3.0).
|
111 |
+
""")
|
112 |
|
113 |
with gr.Accordion("Advanced options", open=False, visible=True):
|
114 |
with gr.Accordion("Advanced diarization options", open=False, visible=True):
|