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

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"].to_list()), 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(numpy.stack(faiss.normalize_L2(data["embedding"]), axis=0))
32
 
33
 
34
  # Define the search function