Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,10 @@ def InputText():
|
|
34 |
InputText
|
35 |
|
36 |
def sendMessage(message):
|
37 |
-
|
|
|
|
|
|
|
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':''}])
|