Anshini commited on
Commit
f3e7e10
·
verified ·
1 Parent(s): e7619fd

Update pages/Statistics.py

Browse files
Files changed (1) hide show
  1. pages/Statistics.py +5 -0
pages/Statistics.py CHANGED
@@ -90,6 +90,11 @@ if submit and user_input:
90
  messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
91
  result = stats_mentor.invoke(messages)
92
  st.session_state[PAGE_KEY].append((user_input, result.content))
 
 
 
 
 
93
 
94
  # Display chat history
95
  if st.session_state[PAGE_KEY]:
 
90
  messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
91
  result = stats_mentor.invoke(messages)
92
  st.session_state[PAGE_KEY].append((user_input, result.content))
93
+ # Define chat history key
94
+ PAGE_KEY = "statistics_chat_history"
95
+ if PAGE_KEY not in st.session_state:
96
+ st.session_state[PAGE_KEY] = []
97
+
98
 
99
  # Display chat history
100
  if st.session_state[PAGE_KEY]: