Update app.py
Browse files
app.py
CHANGED
@@ -154,13 +154,17 @@ def main():
|
|
154 |
if submit_clicked:
|
155 |
output_container = output_container.container()
|
156 |
output_container.chat_message("user").write(user_input)
|
|
|
|
|
|
|
|
|
157 |
|
158 |
-
answer_container = output_container.chat_message("assistant", avatar="🦜")
|
159 |
-
st_callback = StreamlitCallbackHandler(answer_container)
|
160 |
|
161 |
-
answer = agent.run(user_input, callbacks=[st_callback])
|
162 |
|
163 |
-
answer_container = output_container.container()
|
164 |
# answer_container.chat_message("assistant").write(answer)
|
165 |
|
166 |
|
|
|
154 |
if submit_clicked:
|
155 |
output_container = output_container.container()
|
156 |
output_container.chat_message("user").write(user_input)
|
157 |
+
with st.chat_message("assistant"):
|
158 |
+
st_callback = StreamlitCallbackHandler(st.container())
|
159 |
+
response = agent.run(user_input, callbacks=[st_callback])
|
160 |
+
st.write(response)
|
161 |
|
162 |
+
# answer_container = output_container.chat_message("assistant", avatar="🦜")
|
163 |
+
# st_callback = StreamlitCallbackHandler(answer_container,)
|
164 |
|
165 |
+
# answer = agent.run(user_input, callbacks=[st_callback])
|
166 |
|
167 |
+
# answer_container = output_container.container()
|
168 |
# answer_container.chat_message("assistant").write(answer)
|
169 |
|
170 |
|