dominiks commited on
Commit
187649c
·
verified ·
1 Parent(s): 0dccb19

Upload app_federal.py

Browse files
Files changed (1) hide show
  1. app_federal.py +2 -2
app_federal.py CHANGED
@@ -290,13 +290,13 @@ def run_retrieval(query):
290
  query_embeddings = run_dense_retrieval(query)
291
  #query_embeddings = pca_model.transform(query_embeddings)
292
  D, I = faiss_index.search(query_embeddings, 100)
293
- scores_embeddings = list(D[0])
294
  indices_embeddings = I[0]
295
  indices_embeddings = [int(i) for i in indices_embeddings]
296
 
297
  for i in indices_bm25:
298
  if i not in indices_embeddings:
299
- indices_embeddings.append(i)
300
  scores_embeddings.append(-100) #bm25s score is meaningless I think
301
 
302
  # ok, and now bm25s as well
 
290
  query_embeddings = run_dense_retrieval(query)
291
  #query_embeddings = pca_model.transform(query_embeddings)
292
  D, I = faiss_index.search(query_embeddings, 100)
293
+ scores_embeddings = list(D[0])
294
  indices_embeddings = I[0]
295
  indices_embeddings = [int(i) for i in indices_embeddings]
296
 
297
  for i in indices_bm25:
298
  if i not in indices_embeddings:
299
+ indices_embeddings.append(int(i))
300
  scores_embeddings.append(-100) #bm25s score is meaningless I think
301
 
302
  # ok, and now bm25s as well