Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,8 +71,9 @@ api_key = os.getenv("OPENAI_API_KEY")
|
|
| 71 |
|
| 72 |
|
| 73 |
@st.cache_resource
|
| 74 |
-
def load_vector_store(file_path, store_name):
|
| 75 |
-
|
|
|
|
| 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):
|
|
|
|
| 71 |
|
| 72 |
|
| 73 |
@st.cache_resource
|
| 74 |
+
def load_vector_store(file_path, store_name, force_reload=False):
|
| 75 |
+
local_repo_path = "Private_Book"
|
| 76 |
+
vector_store_path = os.path.join(local_repo_path, f"{store_name}.pkl")
|
| 77 |
|
| 78 |
# Check if vector store already exists and force_reload is False
|
| 79 |
if not force_reload and os.path.exists(vector_store_path):
|