Reality123b commited on
Commit
f10933d
·
verified ·
1 Parent(s): 8fde450

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -173,6 +173,15 @@ class XylariaChat:
173
  outputs=[chatbot],
174
  queue=False
175
  )
 
 
 
 
 
 
 
 
 
176
 
177
  return demo
178
 
 
173
  outputs=[chatbot],
174
  queue=False
175
  )
176
+
177
+ # Add event listener to clear memory when browser tab is closed
178
+ demo.js("""
179
+ () => {
180
+ window.addEventListener('beforeunload', function() {
181
+ window.localStorage.clear();
182
+ });
183
+ }
184
+ """)
185
 
186
  return demo
187