Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -97,7 +97,7 @@ if st.sidebar.button("Clear Chat History"):
|
|
97 |
# Display chat history
|
98 |
st.sidebar.write("### Previous Questions")
|
99 |
for idx, chat in enumerate(reversed(st.session_state.chat_history), 1):
|
100 |
-
#
|
101 |
-
|
102 |
-
|
103 |
-
st.
|
|
|
97 |
# Display chat history
|
98 |
st.sidebar.write("### Previous Questions")
|
99 |
for idx, chat in enumerate(reversed(st.session_state.chat_history), 1):
|
100 |
+
# Expander for each chat history item
|
101 |
+
with st.sidebar.expander(f"Question {len(st.session_state.chat_history) - idx + 1}"):
|
102 |
+
st.write(f"**Question:** {chat['question']}")
|
103 |
+
st.write(f"**Answer:** {chat['answer']}")
|