Spaces:
Sleeping
Sleeping
Commit
•
30f2e2b
1
Parent(s):
3d68800
Update app.py
Browse files
app.py
CHANGED
@@ -28,14 +28,15 @@ for message in st.session_state.messages:
|
|
28 |
st.markdown(message['content'])
|
29 |
|
30 |
## messages element format: {'role':'user', 'content':'<user prompt>'}
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
st.
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
39 |
|
40 |
if prompt:=st.chat_input("Enter your query"):
|
41 |
with st.chat_message("user"):
|
|
|
28 |
st.markdown(message['content'])
|
29 |
|
30 |
## messages element format: {'role':'user', 'content':'<user prompt>'}
|
31 |
+
|
32 |
+
if st.session_state.messages==[]:
|
33 |
+
for gr in greetings:
|
34 |
+
with st.chat_message("assistant"):
|
35 |
+
st.markdown(gr)
|
36 |
+
|
37 |
+
st.session_state.messages.append({
|
38 |
+
'role':'assistant',
|
39 |
+
'content': gr})
|
40 |
|
41 |
if prompt:=st.chat_input("Enter your query"):
|
42 |
with st.chat_message("user"):
|