Update app.py
Browse files
app.py
CHANGED
@@ -340,7 +340,7 @@ class App:
|
|
340 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
341 |
inputs=params + whisper_params.as_list(),
|
342 |
outputs=[tb_indicator, files_subtitles, tb_info])
|
343 |
-
btn_run.click(fn=self.update_dataframe,inputs=[cb_timestamp_preview,cb_diarize,input_multi],outputs=tb_indicator)
|
344 |
|
345 |
# btn_openfolder.click(fn=lambda: self.open_folder("outputs"), inputs=None, outputs=None)
|
346 |
|
@@ -391,7 +391,10 @@ class App:
|
|
391 |
return gr.update(visible=False), gr.update(visible=False), gr.update(visible=True)
|
392 |
|
393 |
@staticmethod
|
394 |
-
def update_dataframe(value_cb_timestamp_preview,value_cb_diarize,value_input_multi):
|
|
|
|
|
|
|
395 |
if value_cb_timestamp_preview==True and value_cb_diarize==True:
|
396 |
return gr.Dataframe(headers=["Time","Speaker","Text","Download"],column_widths=["10%","15%","50%","20%"],datatype=["str","str","markdown","html"])
|
397 |
elif value_cb_timestamp_preview==True and value_cb_diarize==False:
|
|
|
340 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
341 |
inputs=params + whisper_params.as_list(),
|
342 |
outputs=[tb_indicator, files_subtitles, tb_info])
|
343 |
+
btn_run.click(fn=self.update_dataframe,inputs=[cb_timestamp_preview,cb_diarize,input_multi,files_subtitles],outputs=tb_indicator)
|
344 |
|
345 |
# btn_openfolder.click(fn=lambda: self.open_folder("outputs"), inputs=None, outputs=None)
|
346 |
|
|
|
391 |
return gr.update(visible=False), gr.update(visible=False), gr.update(visible=True)
|
392 |
|
393 |
@staticmethod
|
394 |
+
def update_dataframe(value_cb_timestamp_preview,value_cb_diarize,value_input_multi,list_files):
|
395 |
+
|
396 |
+
gr.Dataframe.columns[-1] = = "Updated"
|
397 |
+
|
398 |
if value_cb_timestamp_preview==True and value_cb_diarize==True:
|
399 |
return gr.Dataframe(headers=["Time","Speaker","Text","Download"],column_widths=["10%","15%","50%","20%"],datatype=["str","str","markdown","html"])
|
400 |
elif value_cb_timestamp_preview==True and value_cb_diarize==False:
|