ccm commited on
Commit
2b62863
·
verified ·
1 Parent(s): bc256ab

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -0
main.py CHANGED
@@ -27,6 +27,7 @@ index = faiss.IndexFlatL2(len(data["embedding"][0]))
27
  index.metric_type = faiss.METRIC_INNER_PRODUCT
28
  vectors = numpy.stack(data["embedding"].tolist(), axis=0)
29
  faiss.normalize_L2(vectors)
 
30
  index.add(vectors)
31
 
32
  # Load the model for later use in embeddings
 
27
  index.metric_type = faiss.METRIC_INNER_PRODUCT
28
  vectors = numpy.stack(data["embedding"].tolist(), axis=0)
29
  faiss.normalize_L2(vectors)
30
+ index.train(vectors)
31
  index.add(vectors)
32
 
33
  # Load the model for later use in embeddings