Commit
·
8f0b5ca
1
Parent(s):
14282a4
Upload core.py
Browse files
core.py
CHANGED
@@ -186,7 +186,7 @@ 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, rating in input_dict:
|
189 |
-
index = movies.index[movies['title'] ==
|
190 |
movie_ratings[index] = rating
|
191 |
user_embed = create_user_embedding(movie_ratings, movie_embeds)
|
192 |
# Call the find_closest_user function with the pre-built BallTree
|
|
|
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, rating in input_dict:
|
189 |
+
index = movies.index[movies['title'] == movie_title].tolist()[0]
|
190 |
movie_ratings[index] = rating
|
191 |
user_embed = create_user_embedding(movie_ratings, movie_embeds)
|
192 |
# Call the find_closest_user function with the pre-built BallTree
|