eskayML commited on
Commit
7b2946a
Β·
1 Parent(s): c594c51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -43,8 +43,8 @@ def get_similarity(target,candidates):
43
  def search(new_query):
44
  # Get embeddings of the new query
45
  new_query_embeds = get_embeddings([new_query])[0]
46
- top_3_recommendations = list(get_similarity(new_query_embeds, df.query_embeds.tolist()))[:3]
47
- returned_listings = [ df.iloc[i[0]].to_json() for i in top_3_recommendations ]
48
  return returned_listings
49
 
50
 
 
43
  def search(new_query):
44
  # Get embeddings of the new query
45
  new_query_embeds = get_embeddings([new_query])[0]
46
+ top_2_recommendations = list(get_similarity(new_query_embeds, df.query_embeds.tolist()))[:2]
47
+ returned_listings = [ df.iloc[i[0]].to_json() for i in top_2_recommendations ]
48
  return returned_listings
49
 
50