Corran commited on
Commit
c8e695f
·
verified ·
1 Parent(s): 2e8778a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -34,7 +34,10 @@ def InputText():
34
  InputText
35
 
36
  def sendMessage(message):
37
- name = str(auth.user.value['userinfo']['name']).split(" ")[0]
 
 
 
38
  messages.set(messages.value+[{'user':name,'text':message}])
39
  prompt.value += f"[INST] {message} [/INST] \n"
40
  messages.set(messages.value+[{'user':'Assistant','text':''}])
 
34
  InputText
35
 
36
  def sendMessage(message):
37
+ if auth.user.value['userinfo']:
38
+ name = str(auth.user.value['userinfo']['name']).split(" ")[0]
39
+ else:
40
+ name = 'user'
41
  messages.set(messages.value+[{'user':name,'text':message}])
42
  prompt.value += f"[INST] {message} [/INST] \n"
43
  messages.set(messages.value+[{'user':'Assistant','text':''}])