Update app.py
Browse files
app.py
CHANGED
|
@@ -328,30 +328,28 @@ class App:
|
|
| 328 |
btn_reset = gr.Button(value="Reset")
|
| 329 |
btn_reset.click(None,js="window.location.reload()")
|
| 330 |
with gr.Row():
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
elem_id="md_disclaimer")
|
| 346 |
-
with gr.Column(scale=1):
|
| 347 |
-
tb_info = gr.Textbox(label="Output info", interactive=False, show_copy_button=True)
|
| 348 |
-
# btn_openfolder = gr.Button('📂', scale=1)
|
| 349 |
|
| 350 |
params = [input_file_audio, input_file_video, input_file_multi, input_multi, tb_input_folder, dd_file_format, cb_timestamp_file, cb_translate_output, dd_translate_model, dd_target_lang, cb_timestamp_preview]
|
| 351 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
| 352 |
inputs=params + whisper_params.as_list(),
|
| 353 |
outputs=[tb_indicator, files_subtitles, tb_info])
|
| 354 |
-
|
|
|
|
|
|
|
| 355 |
|
| 356 |
input_multi.change(fn=self.update_viewer,inputs=input_multi,outputs=[input_file_audio,input_file_video,input_file_multi])
|
| 357 |
|
|
|
|
| 328 |
btn_reset = gr.Button(value="Reset")
|
| 329 |
btn_reset.click(None,js="window.location.reload()")
|
| 330 |
with gr.Row():
|
| 331 |
+
#tb_indicator = gr.Textbox(label="Output preview (Always review output generated by AI models)", show_copy_button=True, show_label=True)
|
| 332 |
+
tb_info = gr.Textbox(label="Output info", interactive=False, show_copy_button=True)
|
| 333 |
+
tb_indicator = gr.Dataframe(label="Output preview",
|
| 334 |
+
headers= ["Time","Speaker","Text"],
|
| 335 |
+
column_widths = ["7%","10%","82%"],
|
| 336 |
+
datatype = ["str","str","markdown"],
|
| 337 |
+
show_search="search",
|
| 338 |
+
wrap=True,
|
| 339 |
+
line_breaks=True,
|
| 340 |
+
show_label=True,
|
| 341 |
+
show_copy_button=True,
|
| 342 |
+
show_fullscreen_button=True,
|
| 343 |
+
interactive=False,
|
| 344 |
+
elem_id="md_disclaimer")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 345 |
|
| 346 |
params = [input_file_audio, input_file_video, input_file_multi, input_multi, tb_input_folder, dd_file_format, cb_timestamp_file, cb_translate_output, dd_translate_model, dd_target_lang, cb_timestamp_preview]
|
| 347 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
| 348 |
inputs=params + whisper_params.as_list(),
|
| 349 |
outputs=[tb_indicator, files_subtitles, tb_info])
|
| 350 |
+
|
| 351 |
+
#btn_openfolder = gr.Button('📂', scale=1)
|
| 352 |
+
#btn_openfolder.click(fn=lambda: self.open_folder("outputs"), inputs=None, outputs=None)
|
| 353 |
|
| 354 |
input_multi.change(fn=self.update_viewer,inputs=input_multi,outputs=[input_file_audio,input_file_video,input_file_multi])
|
| 355 |
|