ccm commited on
Commit
3c26677
β€’
1 Parent(s): c02382b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -28,7 +28,7 @@ data.reset_index(inplace=True)
28
  # Create a FAISS index for fast similarity search
29
  index = faiss.IndexFlatL2(len(data["embedding"][0]))
30
  index.metric_type = faiss.METRIC_INNER_PRODUCT
31
- index.add(numpy.stack(faiss.normalize_L2(data["embedding"]), axis=0))
32
 
33
 
34
  # Define the search function
 
28
  # Create a FAISS index for fast similarity search
29
  index = faiss.IndexFlatL2(len(data["embedding"][0]))
30
  index.metric_type = faiss.METRIC_INNER_PRODUCT
31
+ index.add(faiss.normalize_L2(numpy.stack(data["embedding"].tolist(), axis=0)))
32
 
33
 
34
  # Define the search function