LAP-DEV commited on
Commit
25629f4
·
verified ·
1 Parent(s): 83fa982

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -18
app.py CHANGED
@@ -392,28 +392,15 @@ 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"],datatype=["str","str","markdown"])
396
  elif value_cb_timestamp_preview==True and value_cb_diarize==False:
397
- return gr.Dataframe(headers=["Time","Text"],datatype=["str","markdown"])
398
  elif value_cb_timestamp_preview==False and value_cb_diarize==True:
399
- return gr.Dataframe(headers=["Speaker","Text"],datatype=["str","markdown"])
400
  elif value_cb_timestamp_preview==False and value_cb_diarize==False:
401
- return gr.Dataframe(headers=["Text"],datatype=["markdown"])
402
  else:
403
- return gr.Dataframe(headers=["Text"],datatype=["markdown"])
404
-
405
- @staticmethod
406
- def update_dataframe_test(value_cb_timestamp_preview,value_cb_diarize,value_input_multi):
407
- if value_cb_timestamp_preview==True and value_cb_diarize==True:
408
- return gr.Dataframe(headers=["Time","Speaker","Text"],column_widths=["10%","10%","79%"],datatype=["str","str","markdown"])
409
- elif value_cb_timestamp_preview==True and value_cb_diarize==False:
410
- return gr.Dataframe(headers=["Time","Text"],column_widths=["10%","89%"],datatype=["str","markdown"])
411
- elif value_cb_timestamp_preview==False and value_cb_diarize==True:
412
- return gr.Dataframe(headers=["Speaker","Text"],column_widths=["10%","89%"],datatype=["str","markdown"])
413
- elif value_cb_timestamp_preview==False and value_cb_diarize==False:
414
- return gr.Dataframe(headers=["Text"],column_widths=["99%"],datatype=["markdown"])
415
- else:
416
- return gr.Dataframe(headers=["Text"],column_widths=["99%"],datatype=["markdown"])
417
 
418
  # Create the parser for command-line arguments
419
  parser = argparse.ArgumentParser()
 
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%","75%"],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%","85%"],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%","85%"],datatype=["str","markdown"])
400
  elif value_cb_timestamp_preview==False and value_cb_diarize==False:
401
+ return gr.Dataframe(headers=["Text"],column_widths=["95%"],datatype=["markdown"])
402
  else:
403
+ return gr.Dataframe(headers=["Text"],column_widths=["95%"],datatype=["markdown"])
 
 
 
 
 
 
 
 
 
 
 
 
 
404
 
405
  # Create the parser for command-line arguments
406
  parser = argparse.ArgumentParser()