Manoj21k commited on
Commit
b9c4ce9
·
1 Parent(s): 7bf90b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -122,7 +122,7 @@ def load_hnsw_index(index_file):
122
  def create_hnsw_index(embeddings_file, M=16, efC=100):
123
  embeddings = np.load(embeddings_file)
124
  num_dim = embeddings.shape[1]
125
- ids = np.arange(embeddings.shape[0]
126
  index = hnswlib.Index(space="ip", dim=num_dim)
127
  index.init_index(max_elements=embeddings.shape[0], ef_construction=efC, M=M)
128
  index.add_items(embeddings, ids)
 
122
  def create_hnsw_index(embeddings_file, M=16, efC=100):
123
  embeddings = np.load(embeddings_file)
124
  num_dim = embeddings.shape[1]
125
+ ids = np.arange(embeddings.shape[0])
126
  index = hnswlib.Index(space="ip", dim=num_dim)
127
  index.init_index(max_elements=embeddings.shape[0], ef_construction=efC, M=M)
128
  index.add_items(embeddings, ids)