Wajahat698 commited on
Commit
850d5a5
·
verified ·
1 Parent(s): 8fd3f82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -531,7 +531,7 @@ def download_link(content, filename):
531
 
532
 
533
 
534
- def fetch_documents():
535
  try:
536
  docs = db.child("users").child(st.session_state["wix_user_id"]).child("KnowledgeBase").get().val()
537
  st.session_state["documents"] = docs if docs else {}
@@ -719,7 +719,7 @@ def side():
719
  """, unsafe_allow_html=True)
720
 
721
  # Fetch documents from Firebase
722
- fetch_documents()
723
 
724
 
725
  if "documents" not in st.session_state:
@@ -784,7 +784,7 @@ def side():
784
  db.child("users").child(st.session_state["wix_user_id"]).child("KnowledgeBase").child(selected_doc_id).remove()
785
 
786
  # Remove the document from session state
787
- fetch_documents()
788
 
789
 
790
 
 
531
 
532
 
533
 
534
+ def fetch_documents(st.session_state["wix_user_id"]):
535
  try:
536
  docs = db.child("users").child(st.session_state["wix_user_id"]).child("KnowledgeBase").get().val()
537
  st.session_state["documents"] = docs if docs else {}
 
719
  """, unsafe_allow_html=True)
720
 
721
  # Fetch documents from Firebase
722
+ fetch_documents(st.session_state["wix_user_id"])
723
 
724
 
725
  if "documents" not in st.session_state:
 
784
  db.child("users").child(st.session_state["wix_user_id"]).child("KnowledgeBase").child(selected_doc_id).remove()
785
 
786
  # Remove the document from session state
787
+ fetch_documents(st.session_state["wix_user_id"])
788
 
789
 
790