Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -268,17 +268,18 @@ for message in st.session_state.messages:
|
|
| 268 |
if query := st.chat_input("Ask a question"):
|
| 269 |
st.session_state.messages.append({"role": "user", "content": query})
|
| 270 |
with st.chat_message("user"):
|
| 271 |
-
st.
|
| 272 |
|
| 273 |
moa_agent: MOAgent = st.session_state.moa_agent
|
| 274 |
with st.chat_message("assistant"):
|
| 275 |
-
|
| 276 |
-
ast_mess = stream_response(moa_agent.chat(query, output_format='json'))
|
| 277 |
response = st.write_stream(ast_mess)
|
| 278 |
-
|
|
|
|
| 279 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
| 280 |
|
| 281 |
|
|
|
|
| 282 |
# Add acknowledgment at the bottom
|
| 283 |
st.markdown("---")
|
| 284 |
st.markdown("""
|
|
|
|
| 268 |
if query := st.chat_input("Ask a question"):
|
| 269 |
st.session_state.messages.append({"role": "user", "content": query})
|
| 270 |
with st.chat_message("user"):
|
| 271 |
+
st.markdown(query)
|
| 272 |
|
| 273 |
moa_agent: MOAgent = st.session_state.moa_agent
|
| 274 |
with st.chat_message("assistant"):
|
| 275 |
+
ast_mess = stream_response(moa_agent.chat(query, output_format="json"))
|
|
|
|
| 276 |
response = st.write_stream(ast_mess)
|
| 277 |
+
|
| 278 |
+
# Save the final response to session state
|
| 279 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
| 280 |
|
| 281 |
|
| 282 |
+
|
| 283 |
# Add acknowledgment at the bottom
|
| 284 |
st.markdown("---")
|
| 285 |
st.markdown("""
|