Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -70,11 +70,9 @@ api_key = os.getenv("OPENAI_API_KEY")
|
|
70 |
|
71 |
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
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):
|