kuroiikimono commited on
Commit
4e5a426
·
verified ·
1 Parent(s): 2bb3bd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -62,9 +62,10 @@ def heart_beat():
62
  logging.info(f"{ctx.session_id} is alive.")
63
  thread.start()
64
  else:
65
- if os.path.isdir(f"removefolder/{st.session_state.uniq}"):
66
- shutil.rmtree(f"removefolder/{st.session_state.uniq}")
67
- logging.info(f"{ctx.session_id} is gone.")
 
68
  return
69
 
70
  # JavaScript to detect browser exit
 
62
  logging.info(f"{ctx.session_id} is alive.")
63
  thread.start()
64
  else:
65
+ if 'uniq' in st.session_state:
66
+ if os.path.isdir(f"removefolder/{st.session_state.uniq}"):
67
+ shutil.rmtree(f"removefolder/{st.session_state.uniq}")
68
+ logging.info(f"{ctx.session_id} is gone.")
69
  return
70
 
71
  # JavaScript to detect browser exit