Update app.py
Browse files
app.py
CHANGED
|
@@ -328,7 +328,7 @@ class App:
|
|
| 328 |
with gr.Row():
|
| 329 |
with gr.Column(scale=4):
|
| 330 |
#tb_indicator = gr.Textbox(label="Output preview (Always review output generated by AI models)", show_copy_button=True, show_label=True)
|
| 331 |
-
tb_indicator = gr.Dataframe(label="Output preview (Always review output generated by AI models)", show_search="search", show_label=True, show_copy_button=True, show_fullscreen_button=True, interactive=False)
|
| 332 |
with gr.Column(scale=1):
|
| 333 |
tb_info = gr.Textbox(label="Output info", interactive=False, show_copy_button=True)
|
| 334 |
files_subtitles = gr.Files(label="Output data", interactive=False, file_count="multiple")
|
|
@@ -391,15 +391,15 @@ class App:
|
|
| 391 |
@staticmethod
|
| 392 |
def update_dataframe(value_cb_timestamp_preview,value_cb_diarize):
|
| 393 |
if value_cb_timestamp_preview==True and value_cb_diarize==True:
|
| 394 |
-
return gr.Dataframe(headers=["Time","Speaker","Text"]
|
| 395 |
elif value_cb_timestamp_preview==True and value_cb_diarize==False:
|
| 396 |
-
return gr.Dataframe(headers=["Time","Text"]
|
| 397 |
elif value_cb_timestamp_preview==False and value_cb_diarize==True:
|
| 398 |
-
return gr.Dataframe(headers=["Speaker","Text"]
|
| 399 |
elif value_cb_timestamp_preview==False and value_cb_diarize==False:
|
| 400 |
-
return gr.Dataframe(headers=["Text"]
|
| 401 |
else:
|
| 402 |
-
return gr.Dataframe(headers=["Text"]
|
| 403 |
|
| 404 |
|
| 405 |
# Create the parser for command-line arguments
|
|
|
|
| 328 |
with gr.Row():
|
| 329 |
with gr.Column(scale=4):
|
| 330 |
#tb_indicator = gr.Textbox(label="Output preview (Always review output generated by AI models)", show_copy_button=True, show_label=True)
|
| 331 |
+
tb_indicator = gr.Dataframe(label="Output preview (Always review output generated by AI models)", headers=["Text"], show_search="search", show_label=True, show_copy_button=True, show_fullscreen_button=True, interactive=False)
|
| 332 |
with gr.Column(scale=1):
|
| 333 |
tb_info = gr.Textbox(label="Output info", interactive=False, show_copy_button=True)
|
| 334 |
files_subtitles = gr.Files(label="Output data", interactive=False, file_count="multiple")
|
|
|
|
| 391 |
@staticmethod
|
| 392 |
def update_dataframe(value_cb_timestamp_preview,value_cb_diarize):
|
| 393 |
if value_cb_timestamp_preview==True and value_cb_diarize==True:
|
| 394 |
+
return gr.Dataframe(headers=["Time","Speaker","Text"])# column_widths=["15%","15%","70%"])
|
| 395 |
elif value_cb_timestamp_preview==True and value_cb_diarize==False:
|
| 396 |
+
return gr.Dataframe(headers=["Time","Text"])# column_widths=["15%","85%"])
|
| 397 |
elif value_cb_timestamp_preview==False and value_cb_diarize==True:
|
| 398 |
+
return gr.Dataframe(headers=["Speaker","Text"])# column_widths=["15%","85%"])
|
| 399 |
elif value_cb_timestamp_preview==False and value_cb_diarize==False:
|
| 400 |
+
return gr.Dataframe(headers=["Text"])# column_widths=["100%"])
|
| 401 |
else:
|
| 402 |
+
return gr.Dataframe(headers=["Text"])# column_widths=["100%"])
|
| 403 |
|
| 404 |
|
| 405 |
# Create the parser for command-line arguments
|