Skip to content

Commit

Permalink
clear memory only when enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Nov 29, 2023
1 parent a2bcc71 commit 048eb6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def new_file():
st.session_state['loaded_embeddings'] = None
st.session_state['doc_id'] = None
st.session_state['uploaded'] = True
st.session_state['memory'].clear()
if st.session_state['memory']:
st.session_state['memory'].clear()


def clear_memory():
Expand Down

0 comments on commit 048eb6f

Please sign in to comment.