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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -98,17 +98,18 @@ class App:
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.Row():
102
- cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English",interactive=True)
103
- cb_timestamp = gr.Checkbox(value=whisper_params["add_timestamp"], label="Add timestamp to output file",interactive=True, visible=True)
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):
 
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):