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)", headers=[""], show_search="search", wrap=True, 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")
|
@@ -392,11 +392,11 @@ class App:
|
|
392 |
@staticmethod
|
393 |
def update_dataframe(value_cb_timestamp_preview,value_cb_diarize,value_input_multi):
|
394 |
if value_cb_timestamp_preview==True and value_cb_diarize==True:
|
395 |
-
return gr.Dataframe(headers=["Time","Speaker","Text"],column_widths=["10%","10%","79%"])
|
396 |
elif value_cb_timestamp_preview==True and value_cb_diarize==False:
|
397 |
-
return gr.Dataframe(headers=["Time","Text"],column_widths=["10%","89%"])
|
398 |
elif value_cb_timestamp_preview==False and value_cb_diarize==True:
|
399 |
-
return gr.Dataframe(headers=["Speaker","Text"],column_widths=["10%","89%"])
|
400 |
elif value_cb_timestamp_preview==False and value_cb_diarize==False:
|
401 |
return gr.Dataframe(headers=["Text"],column_widths=["99%"],datatype=["markdown"])
|
402 |
else:
|
|
|
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=[""], show_search="search", wrap=True, line_breaks=True, 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")
|
|
|
392 |
@staticmethod
|
393 |
def update_dataframe(value_cb_timestamp_preview,value_cb_diarize,value_input_multi):
|
394 |
if value_cb_timestamp_preview==True and value_cb_diarize==True:
|
395 |
+
return gr.Dataframe(headers=["Time","Speaker","Text"],column_widths=["10%","10%","79%"],datatype=["str","str","markdown"])
|
396 |
elif value_cb_timestamp_preview==True and value_cb_diarize==False:
|
397 |
+
return gr.Dataframe(headers=["Time","Text"],column_widths=["10%","89%",,datatype=["str","markdown"])
|
398 |
elif value_cb_timestamp_preview==False and value_cb_diarize==True:
|
399 |
+
return gr.Dataframe(headers=["Speaker","Text"],column_widths=["10%","89%"],,datatype=["str","markdown"])
|
400 |
elif value_cb_timestamp_preview==False and value_cb_diarize==False:
|
401 |
return gr.Dataframe(headers=["Text"],column_widths=["99%"],datatype=["markdown"])
|
402 |
else:
|