Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -56,8 +56,8 @@ def create_embedding(dataset):
|
|
56 |
|
57 |
|
58 |
def build_faiss_index(dataset: pd.DataFrame) -> Tuple[faiss.IndexFlatIP, np.ndarray]:
|
59 |
-
if os.path.exists("
|
60 |
-
return read_index("
|
61 |
|
62 |
dataset["embedding"] = create_embedding(dataset["Book-Title"])
|
63 |
print("creating index")
|
|
|
56 |
|
57 |
|
58 |
def build_faiss_index(dataset: pd.DataFrame) -> Tuple[faiss.IndexFlatIP, np.ndarray]:
|
59 |
+
if os.path.exists("books.index"):
|
60 |
+
return read_index("books.index")
|
61 |
|
62 |
dataset["embedding"] = create_embedding(dataset["Book-Title"])
|
63 |
print("creating index")
|