kuroiikimono commited on
Commit
77ae29d
1 Parent(s): 85de377

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -166,12 +166,12 @@ def main():
166
  ########
167
  reload_bt = st.empty()
168
  if reload_bt.button("Upload another PDF file"):
169
- #for key in st.session_state.keys():
170
- # if key == "count" or key == "temp" or key == "lang":
171
- # continue
172
- # else:
173
- # del st.session_state[key]
174
- #shutil.rmtree(f"removefolder/{temp_dir}")
175
  # page reload
176
  streamlit_js_eval(js_expressions="parent.window.location.reload()")
177
  st.markdown("----")
 
166
  ########
167
  reload_bt = st.empty()
168
  if reload_bt.button("Upload another PDF file"):
169
+ for key in st.session_state.keys():
170
+ if key == "count" or key == "temp" or key == "lang":
171
+ continue
172
+ else:
173
+ del st.session_state[key]
174
+ shutil.rmtree(f"removefolder/{temp_dir}")
175
  # page reload
176
  streamlit_js_eval(js_expressions="parent.window.location.reload()")
177
  st.markdown("----")