Skip to content

Commit

Permalink
refact(#7): refact lowercase title
Browse files Browse the repository at this point in the history
  • Loading branch information
fedepacher committed Jun 11, 2023
1 parent 6e53471 commit 2ad0ed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion recommendation_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def recommendation(self, title=''):
Returns:
str: Dictionary with the movies recommended.
"""
movie_index = self._df_movies[self._df_movies['title'].str.lower() == title].index.values
movie_index = self._df_movies[self._df_movies['title'].str.lower() == title.lower()].index.values
if len(movie_index) > 0:
similarity_scores = cosine_similarity(self._tfidf_matrix[movie_index],
self._tfidf_matrix)
Expand Down

0 comments on commit 2ad0ed9

Please sign in to comment.