Spaces:
Sleeping
Sleeping
KushwanthK
commited on
replace file_path with index_path for faiss index
Browse files
app.py
CHANGED
@@ -138,8 +138,9 @@ import os
|
|
138 |
import pickle
|
139 |
def get_faiss_semantic_index():
|
140 |
try:
|
|
|
141 |
# Load embeddings from the pickle file
|
142 |
-
with open(
|
143 |
faiss_index = pickle.load(f)
|
144 |
st.write("Embeddings loaded successfully.")
|
145 |
return faiss_index
|
|
|
138 |
import pickle
|
139 |
def get_faiss_semantic_index():
|
140 |
try:
|
141 |
+
index_path = "./HuggingFaceEmbeddings.pkl"
|
142 |
# Load embeddings from the pickle file
|
143 |
+
with open(index_path, "rb") as f:
|
144 |
faiss_index = pickle.load(f)
|
145 |
st.write("Embeddings loaded successfully.")
|
146 |
return faiss_index
|