Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ assistant = st.chat_message("assistant")
|
|
64 |
assistant.write("How can I help you today?")
|
65 |
|
66 |
def assistant_response(response):
|
67 |
-
message_placeholder =
|
68 |
full_response = ""
|
69 |
assistant_response = response
|
70 |
# Simulate stream of response with milliseconds delay
|
@@ -80,7 +80,9 @@ def assistant_response(response):
|
|
80 |
if prompt := st.chat_input("What kind of class are you looking for?"):
|
81 |
with st.chat_message("user"):
|
82 |
st.markdown(prompt)
|
|
|
83 |
assistant_response("Yah I'm tired af right now boi")
|
|
|
84 |
|
85 |
|
86 |
# if prompt := st.chat_input("What kind of class are you looking for?"):
|
|
|
64 |
assistant.write("How can I help you today?")
|
65 |
|
66 |
def assistant_response(response):
|
67 |
+
message_placeholder = assistant.empty()
|
68 |
full_response = ""
|
69 |
assistant_response = response
|
70 |
# Simulate stream of response with milliseconds delay
|
|
|
80 |
if prompt := st.chat_input("What kind of class are you looking for?"):
|
81 |
with st.chat_message("user"):
|
82 |
st.markdown(prompt)
|
83 |
+
st.sessionstate.messages.append({"role": "user", "content": prompt})
|
84 |
assistant_response("Yah I'm tired af right now boi")
|
85 |
+
|
86 |
|
87 |
|
88 |
# if prompt := st.chat_input("What kind of class are you looking for?"):
|