AmirShabani commited on
Commit
225ee02
·
1 Parent(s): 325a5ae

Retry input_dict

Browse files
Files changed (1) hide show
  1. core.py +1 -2
core.py CHANGED
@@ -186,9 +186,8 @@ def drop_non_numerical_columns(df):
186
  def output_list(input_dict, movies_df = movie_embeds, tree = btree, user_embeddings = user_embeds, movies = final_movies):
187
  movie_ratings = {}
188
  for movie_title in input_dict:
189
- print(str(movie_title))
190
  index = movies.index[movies['title'] == movie_title].tolist()[0]
191
- movie_ratings[index] = rating
192
  user_embed = create_user_embedding(movie_ratings, movie_embeds)
193
  # Call the find_closest_user function with the pre-built BallTree
194
  closest_user_embed = find_closest_user(user_embed, tree, user_embeds)
 
186
  def output_list(input_dict, movies_df = movie_embeds, tree = btree, user_embeddings = user_embeds, movies = final_movies):
187
  movie_ratings = {}
188
  for movie_title in input_dict:
 
189
  index = movies.index[movies['title'] == movie_title].tolist()[0]
190
+ movie_ratings[index] = input_dict[movie_title]
191
  user_embed = create_user_embedding(movie_ratings, movie_embeds)
192
  # Call the find_closest_user function with the pre-built BallTree
193
  closest_user_embed = find_closest_user(user_embed, tree, user_embeds)