LAP-DEV commited on
Commit
9547e6b
·
verified ·
1 Parent(s): 2e070b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
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.Column():
102
- with gr.Row():
103
- cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English",interactive=True)
104
- cb_timestamp = gr.Checkbox(value=whisper_params["add_timestamp"], label="Add timestamp to output file",interactive=True, visible=True)
105
- cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"], label="Use diarization",interactive=True)
106
- dd_file_format = gr.Dropdown(choices=["TXT","SRT"], value="TXT", label="Output format", visible=False, info="Output preview format")
107
- with gr.Row():
108
- with gr.Accordion("Speaker diarization", open=False, visible=True):
109
- tb_hf_token = gr.Text(label="Token", value=diarization_params["hf_token"],info="Required to use diarization")
110
- gr.Markdown("""
111
- 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).
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):