Update app.py
Browse files
app.py
CHANGED
@@ -97,7 +97,11 @@ class App:
|
|
97 |
|
98 |
with gr.Row():
|
99 |
with gr.Column(scale=1):
|
100 |
-
|
|
|
|
|
|
|
|
|
101 |
with gr.Column(scale=4):
|
102 |
input_file = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True, visible=True, interactive=True)
|
103 |
input_file_multi = gr.Files(label="Upload one or more audio/video files here", elem_id="audio_input", type='filepath', file_count="multiple", file_types=["audio","video"], visible=False, interactive=True)
|
@@ -115,13 +119,6 @@ class App:
|
|
115 |
cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English", info="Translate using OpenAI Whisper's built-in module",interactive=True)
|
116 |
cb_translate_output = gr.Checkbox(value=translation_params["translate_output"], label="Translate to selected language", info="Translate using Facebook's NLLB",interactive=True)
|
117 |
|
118 |
-
with gr.Row():
|
119 |
-
with gr.Column(scale=2):
|
120 |
-
dd_file_format = gr.Dropdown(choices=["CSV","SRT","TXT"], value="CSV", label="Output format", multiselect=True, interactive=True, visible=True)
|
121 |
-
with gr.Column(scale=2):
|
122 |
-
cb_timestamp_preview = gr.Checkbox(value=whisper_params["add_timestamp_preview"],label="Show preview with timestamps", interactive=True)
|
123 |
-
cb_timestamp_file = gr.Checkbox(value=whisper_params["add_timestamp_file"], label="Add timestamp to filenames", interactive=True)
|
124 |
-
|
125 |
with gr.Accordion("Speaker diarization", open=False, visible=True):
|
126 |
cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Use diarization",interactive=True)
|
127 |
tb_hf_token = gr.Text(label="Token", value=diarization_params["hf_token"],info="An access token is required to use diarization & 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) & [segmentation](https://huggingface.co/pyannote/segmentation-3.0).")
|
|
|
97 |
|
98 |
with gr.Row():
|
99 |
with gr.Column(scale=1):
|
100 |
+
with gr.Row():
|
101 |
+
input_multi = gr.Radio(["Single", "Multiple"], label="Process one or multiple files", value="Single")
|
102 |
+
dd_file_format = gr.Dropdown(choices=["CSV","SRT","TXT"], value="CSV", label="Output format", multiselect=True, interactive=True, visible=True)
|
103 |
+
cb_timestamp_preview = gr.Checkbox(value=whisper_params["add_timestamp_preview"],label="Show preview with timestamps", interactive=True)
|
104 |
+
cb_timestamp_file = gr.Checkbox(value=whisper_params["add_timestamp_file"], label="Add timestamp to filenames", interactive=True)
|
105 |
with gr.Column(scale=4):
|
106 |
input_file = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True, visible=True, interactive=True)
|
107 |
input_file_multi = gr.Files(label="Upload one or more audio/video files here", elem_id="audio_input", type='filepath', file_count="multiple", file_types=["audio","video"], visible=False, interactive=True)
|
|
|
119 |
cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English", info="Translate using OpenAI Whisper's built-in module",interactive=True)
|
120 |
cb_translate_output = gr.Checkbox(value=translation_params["translate_output"], label="Translate to selected language", info="Translate using Facebook's NLLB",interactive=True)
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
with gr.Accordion("Speaker diarization", open=False, visible=True):
|
123 |
cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Use diarization",interactive=True)
|
124 |
tb_hf_token = gr.Text(label="Token", value=diarization_params["hf_token"],info="An access token is required to use diarization & 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) & [segmentation](https://huggingface.co/pyannote/segmentation-3.0).")
|