Yoxas commited on
Commit
ee9bc42
·
verified ·
1 Parent(s): 29b1293

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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(data['embedding'].tolist(), dtype=np.float32)
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)