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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -531,7 +531,7 @@ def download_link(content, filename):
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,7 +719,6 @@ def side():
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,7 +783,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(st.session_state["wix_user_id"])
788
 
789
 
790
 
 
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
  """, unsafe_allow_html=True)
720
 
721
  # Fetch documents from Firebase
 
722
 
723
 
724
  if "documents" not in st.session_state:
 
783
  db.child("users").child(st.session_state["wix_user_id"]).child("KnowledgeBase").child(selected_doc_id).remove()
784
 
785
  # Remove the document from session state
786
+ fetch_documents()
787
 
788
 
789