awacke1 commited on
Commit
4f4e42a
Β·
verified Β·
1 Parent(s): 642b060

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -202,14 +202,14 @@ def show_file_manager():
202
  with open(uploaded_file.name, "wb") as f:
203
  f.write(uploaded_file.getvalue())
204
  st.success(f"Uploaded: {uploaded_file.name}")
205
- st.experimental_rerun()
206
 
207
  with col2:
208
  if st.button("πŸ—‘ Clear All Files"):
209
  for f in glob.glob("*.txt") + glob.glob("*.md") + glob.glob("*.mp3"):
210
  os.remove(f)
211
  st.success("All files cleared!")
212
- st.experimental_rerun()
213
 
214
  files = glob.glob("*.txt") + glob.glob("*.md") + glob.glob("*.mp3")
215
  if files:
@@ -223,7 +223,7 @@ def show_file_manager():
223
  st.text_area("Content", file.read(), height=100)
224
  if st.button(f"Delete {os.path.basename(f)}", key=f"del_{f}"):
225
  os.remove(f)
226
- st.experimental_rerun()
227
 
228
  def arxiv_search(query, max_results=5):
229
  """Perform a simple Arxiv search using their API and return top results."""
@@ -397,7 +397,7 @@ def main():
397
  st.subheader("βš™οΈ Settings & History")
398
  if st.button("πŸ—‘οΈ Clear History"):
399
  st.session_state['search_history'] = []
400
- st.experimental_rerun()
401
 
402
  st.markdown("### Recent Searches")
403
  for entry in reversed(st.session_state['search_history'][-5:]):
 
202
  with open(uploaded_file.name, "wb") as f:
203
  f.write(uploaded_file.getvalue())
204
  st.success(f"Uploaded: {uploaded_file.name}")
205
+ st.rerun()
206
 
207
  with col2:
208
  if st.button("πŸ—‘ Clear All Files"):
209
  for f in glob.glob("*.txt") + glob.glob("*.md") + glob.glob("*.mp3"):
210
  os.remove(f)
211
  st.success("All files cleared!")
212
+ st.rerun()
213
 
214
  files = glob.glob("*.txt") + glob.glob("*.md") + glob.glob("*.mp3")
215
  if files:
 
223
  st.text_area("Content", file.read(), height=100)
224
  if st.button(f"Delete {os.path.basename(f)}", key=f"del_{f}"):
225
  os.remove(f)
226
+ st.rerun()
227
 
228
  def arxiv_search(query, max_results=5):
229
  """Perform a simple Arxiv search using their API and return top results."""
 
397
  st.subheader("βš™οΈ Settings & History")
398
  if st.button("πŸ—‘οΈ Clear History"):
399
  st.session_state['search_history'] = []
400
+ st.rerun()
401
 
402
  st.markdown("### Recent Searches")
403
  for entry in reversed(st.session_state['search_history'][-5:]):