inie2003 commited on
Commit
9bd955c
·
verified ·
1 Parent(s): ae436b7

updated helper.py

Browse files
Files changed (1) hide show
  1. helper.py +1 -1
helper.py CHANGED
@@ -108,7 +108,7 @@ def search(query, df, limit, offset, scoring_func, search_in_images):
108
 
109
  # Calculate the cosine similarity between the query vector and each image vector
110
  query_vector = query_vector[0, :].detach().numpy() # Detach and convert to a NumPy array
111
- image_vectors = image_vectoßrs.detach().numpy() # Convert the image vectors to a NumPy array
112
  cosine_similarities = cosine_similarity([query_vector], image_vectors)
113
 
114
  # Get the top K indices of the most similar image vectors
 
108
 
109
  # Calculate the cosine similarity between the query vector and each image vector
110
  query_vector = query_vector[0, :].detach().numpy() # Detach and convert to a NumPy array
111
+ image_vectors = image_vectors.detach().numpy() # Convert the image vectors to a NumPy array
112
  cosine_similarities = cosine_similarity([query_vector], image_vectors)
113
 
114
  # Get the top K indices of the most similar image vectors