Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def flatten_embeddings(example):
|
|
41 |
data = data.map(flatten_embeddings)
|
42 |
|
43 |
# Ensure embeddings are in the correct shape for FAISS
|
44 |
-
embeddings = np.array(
|
45 |
|
46 |
# Add FAISS index
|
47 |
data.add_faiss_index_from_external_arrays("embedding", embeddings)
|
|
|
41 |
data = data.map(flatten_embeddings)
|
42 |
|
43 |
# Ensure embeddings are in the correct shape for FAISS
|
44 |
+
embeddings = np.array([example['embedding'] for example in data], dtype=np.float32)
|
45 |
|
46 |
# Add FAISS index
|
47 |
data.add_faiss_index_from_external_arrays("embedding", embeddings)
|