Chris4K commited on
Commit
cb2b78b
1 Parent(s): e6d71ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -1
app.py CHANGED
@@ -305,7 +305,6 @@ def calculate_statistics(results, search_time, vector_store, num_tokens, embeddi
305
  query_embedding = embedding_model.embed_query(query)
306
  result_embeddings = [embedding_model.embed_query(doc.page_content) for doc in results]
307
  similarities = [np.inner(query_embedding, emb) for emb in result_embeddings]
308
- similarities = [np.inner(query_embedding, emb)[0] for emb in result_embeddings]
309
  rank_correlation, _ = spearmanr(similarities, range(len(similarities)))
310
  stats["rank_correlation"] = rank_correlation
311
 
 
305
  query_embedding = embedding_model.embed_query(query)
306
  result_embeddings = [embedding_model.embed_query(doc.page_content) for doc in results]
307
  similarities = [np.inner(query_embedding, emb) for emb in result_embeddings]
 
308
  rank_correlation, _ = spearmanr(similarities, range(len(similarities)))
309
  stats["rank_correlation"] = rank_correlation
310