Anne31415 commited on
Commit
f203e7a
1 Parent(s): 4981968

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -70,11 +70,9 @@ api_key = os.getenv("OPENAI_API_KEY")
70
 
71
 
72
 
73
- # Updated load_vector_store function with Streamlit text outputs and directory handling for Git
74
- #@st.cache_data(persist="disk")
75
- def load_vector_store(file_path, store_name, force_reload=False):
76
- local_repo_path = "Private_Book"
77
- vector_store_path = os.path.join(local_repo_path, f"{store_name}.pkl")
78
 
79
  # Check if vector store already exists and force_reload is False
80
  if not force_reload and os.path.exists(vector_store_path):
 
70
 
71
 
72
 
73
+ @st.cache_resource
74
+ def load_vector_store(file_path, store_name):
75
+ vector_store_path = os.path.join("Private_Book", f"{store_name}.pkl")
 
 
76
 
77
  # Check if vector store already exists and force_reload is False
78
  if not force_reload and os.path.exists(vector_store_path):