tykiww commited on
Commit
ea58d27
1 Parent(s): 0cc20f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -51,11 +51,11 @@ def default_table():
51
  "Title": ["", "", "", "", ""]
52
  })
53
 
54
- def substitue_names(speaker_names, text):
55
 
56
  df = speaker_names.itertuples(index=False)
57
  for default, name, title in df:
58
- if title <> "":
59
  title = " ("+title+")"
60
 
61
  text = text.replace(default, f"{name}{title}")
@@ -118,7 +118,7 @@ def main(conf):
118
  )
119
 
120
  fix_button.click(
121
- fn=substitue_names,
122
  inputs=[speaker_names, transcription_output],
123
  outputs=[label_file_link]
124
  )
 
51
  "Title": ["", "", "", "", ""]
52
  })
53
 
54
+ def substitute_names(speaker_names, text):
55
 
56
  df = speaker_names.itertuples(index=False)
57
  for default, name, title in df:
58
+ if title != "":
59
  title = " ("+title+")"
60
 
61
  text = text.replace(default, f"{name}{title}")
 
118
  )
119
 
120
  fix_button.click(
121
+ fn=substitute_names,
122
  inputs=[speaker_names, transcription_output],
123
  outputs=[label_file_link]
124
  )