dlflannery commited on
Commit
034e6f1
·
verified ·
1 Parent(s): cd53d09

Update app.py

Browse files

correct user window/name issue ?

Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -235,11 +235,15 @@ def set_speak_button(txt):
235
  vis = True
236
  return gr.Button(visible=vis)
237
 
238
- def update_user(txt):
239
- user = txt.strip().lower()
 
 
 
 
 
240
  return [user, user]
241
 
242
-
243
  def speech_worker(chunks=[],q=[]):
244
  for chunk in chunks:
245
  fpath = q.pop(0)
 
235
  vis = True
236
  return gr.Button(visible=vis)
237
 
238
+ def update_user(user_win):
239
+ user_win = user_win.lower().strip()
240
+ user = 'unknown'
241
+ for s in unames:
242
+ if user_win == s:
243
+ user = s
244
+ break
245
  return [user, user]
246
 
 
247
  def speech_worker(chunks=[],q=[]):
248
  for chunk in chunks:
249
  fpath = q.pop(0)