Spaces:
Sleeping
Sleeping
Reversing the for loop so that most recent conversation can come at top
Browse files- chatbot.py +1 -1
chatbot.py
CHANGED
|
@@ -109,7 +109,7 @@ def render_chatbot(code, output, error):
|
|
| 109 |
except:
|
| 110 |
pass # Summary failure shouldn't break the UI
|
| 111 |
|
| 112 |
-
for q, a in st.session_state.conversation:
|
| 113 |
st.markdown(f'<div class="chat-message user-message">{escape(q)}</div>', unsafe_allow_html=True)
|
| 114 |
|
| 115 |
def format_response(text):
|
|
|
|
| 109 |
except:
|
| 110 |
pass # Summary failure shouldn't break the UI
|
| 111 |
|
| 112 |
+
for q, a in reversed(st.session_state.conversation):
|
| 113 |
st.markdown(f'<div class="chat-message user-message">{escape(q)}</div>', unsafe_allow_html=True)
|
| 114 |
|
| 115 |
def format_response(text):
|