LAP-DEV commited on
Commit
0adf407
·
verified ·
1 Parent(s): dd622db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
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,files_subtitles],outputs=tb_indicator)
344
 
345
  # btn_openfolder.click(fn=lambda: self.open_folder("outputs"), inputs=None, outputs=None)
346
 
@@ -391,9 +391,13 @@ 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,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"])
 
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,tb_indicator,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,dataframe_data,list_files):
395
 
396
+ temp = dataframe_data
397
+ print("test df data: ")
398
+ print(temp)
399
+
400
+ return gr.Dataframe(headers=["Text","Download"],column_widths=["75%","20%"],datatype=["markdown","html"],value=temp)
401
 
402
  if value_cb_timestamp_preview==True and value_cb_diarize==True:
403
  return gr.Dataframe(headers=["Time","Speaker","Text","Download"],column_widths=["10%","15%","50%","20%"],datatype=["str","str","markdown","html"])