MarcosRodrigo commited on
Commit
06ef16a
·
verified ·
1 Parent(s): 6358cd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -177,10 +177,14 @@ elif menu == "Current":
177
  # History view to check past summaries
178
  elif menu == "History":
179
  st.title("Breakfast Poll History")
 
 
180
  if not st.session_state.history:
181
  st.session_state.history = load_history()
 
182
  if st.session_state.history:
183
- for record in st.session_state.history:
 
184
  st.subheader(f"Date: {record['Date']}")
185
  st.table(record["Summary"])
186
  else:
 
177
  # History view to check past summaries
178
  elif menu == "History":
179
  st.title("Breakfast Poll History")
180
+
181
+ # Reload history if it's not already loaded
182
  if not st.session_state.history:
183
  st.session_state.history = load_history()
184
+
185
  if st.session_state.history:
186
+ # Display history in reverse chronological order
187
+ for record in reversed(st.session_state.history):
188
  st.subheader(f"Date: {record['Date']}")
189
  st.table(record["Summary"])
190
  else: