Update app.py
Browse files
app.py
CHANGED
|
@@ -97,9 +97,8 @@ class App:
|
|
| 97 |
|
| 98 |
with gr.Row():
|
| 99 |
with gr.Column(scale=1):
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
dd_file_format = gr.Dropdown(choices=["CSV","SRT","TXT"], value=whisper_params["output_format"], label="Output format", multiselect=True, interactive=True, visible=True)
|
| 103 |
with gr.Column(scale=4):
|
| 104 |
input_file_audio = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True, visible=True, interactive=True)
|
| 105 |
input_file_video = gr.Video(elem_id="video_input", show_download_button=True, visible=False, interactive=True)
|
|
@@ -114,15 +113,15 @@ class App:
|
|
| 114 |
with gr.Row():
|
| 115 |
dd_translate_model = gr.Dropdown(choices=self.nllb_inf.available_models, value=nllb_params["model_size"],label="Model", info="Model used for translation", interactive=True)
|
| 116 |
dd_target_lang = gr.Dropdown(choices=["English","Dutch","French","German"], value=nllb_params["target_lang"],label="Language", info="Language used for output translation", interactive=True)
|
| 117 |
-
with gr.Column(scale=
|
| 118 |
with gr.Row():
|
| 119 |
cb_timestamp_preview = gr.Checkbox(value=whisper_params["add_timestamp_preview"],label="Add timestamp to preview", interactive=True)
|
| 120 |
cb_timestamp_file = gr.Checkbox(value=whisper_params["add_timestamp_file"], label="Add timestamp to output", interactive=True)
|
| 121 |
with gr.Row():
|
| 122 |
cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Speaker diarization", info="Token required for diarization",interactive=True)
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
|
| 127 |
with gr.Accordion("Options", open=False, visible=True):
|
| 128 |
|
|
|
|
| 97 |
|
| 98 |
with gr.Row():
|
| 99 |
with gr.Column(scale=1):
|
| 100 |
+
input_multi = gr.Radio(["Audio", "Video", "Multiple"], label="Process one or multiple files", value="Audio")
|
| 101 |
+
dd_file_format = gr.Dropdown(choices=["CSV","SRT","TXT"], value=whisper_params["output_format"], label="Output format", multiselect=True, interactive=True, visible=True)
|
|
|
|
| 102 |
with gr.Column(scale=4):
|
| 103 |
input_file_audio = gr.Audio(type='filepath', elem_id="audio_input", show_download_button=True, visible=True, interactive=True)
|
| 104 |
input_file_video = gr.Video(elem_id="video_input", show_download_button=True, visible=False, interactive=True)
|
|
|
|
| 113 |
with gr.Row():
|
| 114 |
dd_translate_model = gr.Dropdown(choices=self.nllb_inf.available_models, value=nllb_params["model_size"],label="Model", info="Model used for translation", interactive=True)
|
| 115 |
dd_target_lang = gr.Dropdown(choices=["English","Dutch","French","German"], value=nllb_params["target_lang"],label="Language", info="Language used for output translation", interactive=True)
|
| 116 |
+
with gr.Column(scale=1):
|
| 117 |
with gr.Row():
|
| 118 |
cb_timestamp_preview = gr.Checkbox(value=whisper_params["add_timestamp_preview"],label="Add timestamp to preview", interactive=True)
|
| 119 |
cb_timestamp_file = gr.Checkbox(value=whisper_params["add_timestamp_file"], label="Add timestamp to output", interactive=True)
|
| 120 |
with gr.Row():
|
| 121 |
cb_diarize = gr.Checkbox(value=diarization_params["is_diarize"],label="Speaker diarization", info="Token required for diarization",interactive=True)
|
| 122 |
+
with gr.Column(scale=1):
|
| 123 |
+
cb_translate = gr.Checkbox(value=whisper_params["is_translate"], label="Translate to English", info="Translate using OpenAI Whisper's built-in module",interactive=True)
|
| 124 |
+
cb_translate_output = gr.Checkbox(value=translation_params["translate_output"], label="Translate to selected language", info="Translate using Facebook's NLLB",interactive=True)
|
| 125 |
|
| 126 |
with gr.Accordion("Options", open=False, visible=True):
|
| 127 |
|