qqwjq1981 commited on
Commit
3458dd7
·
verified ·
1 Parent(s): 2e011e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -51,6 +51,7 @@ except Exception as e:
51
  client = OpenAI(
52
  api_key= os.environ.get("openAI_api_key"), # This is the default and can be omitted
53
  )
 
54
 
55
  def silence(duration, fps=44100):
56
  """
@@ -514,11 +515,11 @@ def build_interface():
514
  # Editable JSON Data
515
  editable_table = gr.Dataframe(
516
  value=[], # Default to an empty list to avoid undefined values
517
- headers=["start", "original", "translated", "end"],
518
- datatype=["number", "str", "str", "number"],
519
  row_count=1, # Initially empty
520
- col_count=4,
521
- interactive=[False, True, True, False], # Control editability
522
  label="Edit Translations",
523
  wrap=True # Enables text wrapping if supported
524
  )
 
51
  client = OpenAI(
52
  api_key= os.environ.get("openAI_api_key"), # This is the default and can be omitted
53
  )
54
+ hf_api_key = os.environ.get("hf_token")
55
 
56
  def silence(duration, fps=44100):
57
  """
 
515
  # Editable JSON Data
516
  editable_table = gr.Dataframe(
517
  value=[], # Default to an empty list to avoid undefined values
518
+ headers=["start", "original", "translated", "end", "speaker"],
519
+ datatype=["number", "str", "str", "number", "str"],
520
  row_count=1, # Initially empty
521
+ col_count=5,
522
+ interactive=[False, True, True, False, False], # Control editability
523
  label="Edit Translations",
524
  wrap=True # Enables text wrapping if supported
525
  )