Update app.py
Browse files
app.py
CHANGED
@@ -126,10 +126,11 @@ if submit_button and user_input:
|
|
126 |
st.session_state['generated'].append(output)
|
127 |
|
128 |
# Display chat history within the container
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
133 |
|
134 |
# Ensure chat history is always scrollable
|
135 |
st.markdown("""
|
|
|
126 |
st.session_state['generated'].append(output)
|
127 |
|
128 |
# Display chat history within the container
|
129 |
+
if st.session_state['generated']:
|
130 |
+
with chat_history_container:
|
131 |
+
for i in range(len(st.session_state['generated'])):
|
132 |
+
message(st.session_state["past"][i], is_user=True, key=str(i) + '_user', avatar_style="big-smile")
|
133 |
+
message(st.session_state["generated"][i], key=str(i), avatar_style="thumbs")
|
134 |
|
135 |
# Ensure chat history is always scrollable
|
136 |
st.markdown("""
|