vsj0702 commited on
Commit
7236bd5
·
verified ·
1 Parent(s): b2bd09b

Reversing the for loop so that most recent conversation can come at top

Browse files
Files changed (1) hide show
  1. 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):