llepogam commited on
Commit
21af307
Β·
1 Parent(s): c30652a

update history table

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -249,8 +249,11 @@ if user_input:
249
  if st.session_state.history:
250
  with st.expander("πŸ“œ Analysis History"):
251
  history_df = pd.DataFrame(st.session_state.history)
 
 
 
252
  st.dataframe(
253
- history_df,
254
  column_config={
255
  "timestamp": "Time",
256
  "text": "Input Text",
 
249
  if st.session_state.history:
250
  with st.expander("πŸ“œ Analysis History"):
251
  history_df = pd.DataFrame(st.session_state.history)
252
+ history_df_output = (history_df
253
+ .sort_values('timestamp', ascending=False)
254
+ .head(20))
255
  st.dataframe(
256
+ history_df_output,
257
  column_config={
258
  "timestamp": "Time",
259
  "text": "Input Text",