update history table
Browse files
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 |
-
|
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",
|