Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ import os
|
|
| 9 |
|
| 10 |
# Load data and FAISS index
|
| 11 |
def load_data_and_index():
|
| 12 |
-
docs_df = pd.read_pickle("
|
| 13 |
embeddings = np.array(docs_df['embeddings'].tolist(), dtype=np.float32)
|
| 14 |
dimension = embeddings.shape[1]
|
| 15 |
index = faiss.IndexFlatL2(dimension)
|
|
|
|
| 9 |
|
| 10 |
# Load data and FAISS index
|
| 11 |
def load_data_and_index():
|
| 12 |
+
docs_df = pd.read_pickle("data.pkl") # Adjust path for HF Spaces
|
| 13 |
embeddings = np.array(docs_df['embeddings'].tolist(), dtype=np.float32)
|
| 14 |
dimension = embeddings.shape[1]
|
| 15 |
index = faiss.IndexFlatL2(dimension)
|