jhj0517 commited on
Commit
4d9f169
·
1 Parent(s): 0cd08e6

update visibility

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -61,7 +61,7 @@ class App:
61
  cb_translate = gr.Checkbox(value=False, label="Translate to English?", interactive=True)
62
  with gr.Row():
63
  cb_timestamp = gr.Checkbox(value=True, label="Add a timestamp to the end of the filename", interactive=True)
64
- with gr.Accordion("VAD Options", open=False):
65
  cb_vad_filter = gr.Checkbox(label="Enable Silero VAD Filter", value=False, interactive=True)
66
  sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
67
  nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
@@ -135,7 +135,7 @@ class App:
135
  with gr.Row():
136
  cb_timestamp = gr.Checkbox(value=True, label="Add a timestamp to the end of the filename",
137
  interactive=True)
138
- with gr.Accordion("VAD Options", open=False):
139
  cb_vad_filter = gr.Checkbox(label="Enable Silero VAD Filter", value=False, interactive=True)
140
  sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
141
  nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
@@ -201,7 +201,7 @@ class App:
201
  dd_file_format = gr.Dropdown(["SRT", "WebVTT", "txt"], value="SRT", label="File Format")
202
  with gr.Row():
203
  cb_translate = gr.Checkbox(value=False, label="Translate to English?", interactive=True)
204
- with gr.Accordion("VAD Options", open=False):
205
  cb_vad_filter = gr.Checkbox(label="Enable Silero VAD Filter", value=False, interactive=True)
206
  sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
207
  nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
 
61
  cb_translate = gr.Checkbox(value=False, label="Translate to English?", interactive=True)
62
  with gr.Row():
63
  cb_timestamp = gr.Checkbox(value=True, label="Add a timestamp to the end of the filename", interactive=True)
64
+ with gr.Accordion("VAD Options", open=False, visible=not self.args.disable_faster_whisper):
65
  cb_vad_filter = gr.Checkbox(label="Enable Silero VAD Filter", value=False, interactive=True)
66
  sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
67
  nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
 
135
  with gr.Row():
136
  cb_timestamp = gr.Checkbox(value=True, label="Add a timestamp to the end of the filename",
137
  interactive=True)
138
+ with gr.Accordion("VAD Options", open=False, visible=not self.args.disable_faster_whisper):
139
  cb_vad_filter = gr.Checkbox(label="Enable Silero VAD Filter", value=False, interactive=True)
140
  sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
141
  nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
 
201
  dd_file_format = gr.Dropdown(["SRT", "WebVTT", "txt"], value="SRT", label="File Format")
202
  with gr.Row():
203
  cb_translate = gr.Checkbox(value=False, label="Translate to English?", interactive=True)
204
+ with gr.Accordion("VAD Options", open=False, visible=not self.args.disable_faster_whisper):
205
  cb_vad_filter = gr.Checkbox(label="Enable Silero VAD Filter", value=False, interactive=True)
206
  sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
207
  nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)