Spaces:
Sleeping
Sleeping
clear memory only when enabled
Browse files- streamlit_app.py +2 -1
streamlit_app.py
CHANGED
@@ -106,7 +106,8 @@ def new_file():
|
|
106 |
st.session_state['loaded_embeddings'] = None
|
107 |
st.session_state['doc_id'] = None
|
108 |
st.session_state['uploaded'] = True
|
109 |
-
st.session_state['memory']
|
|
|
110 |
|
111 |
|
112 |
def clear_memory():
|
|
|
106 |
st.session_state['loaded_embeddings'] = None
|
107 |
st.session_state['doc_id'] = None
|
108 |
st.session_state['uploaded'] = True
|
109 |
+
if st.session_state['memory']:
|
110 |
+
st.session_state['memory'].clear()
|
111 |
|
112 |
|
113 |
def clear_memory():
|