From 2ad0ed931974bb7d09a7e257e2fa5ce4270c1031 Mon Sep 17 00:00:00 2001 From: fedepacher Date: Sun, 11 Jun 2023 17:12:59 -0300 Subject: [PATCH 1/2] refact(#7): refact lowercase title --- recommendation_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recommendation_system.py b/recommendation_system.py index 3b90fff..20e730b 100644 --- a/recommendation_system.py +++ b/recommendation_system.py @@ -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) From 4db5198804bb58f189354e8bf293b35b74637e89 Mon Sep 17 00:00:00 2001 From: fedepacher Date: Sun, 11 Jun 2023 17:13:39 -0300 Subject: [PATCH 2/2] refact: refactor requirements library version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 96dda80..b6136da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ python-dateutil pytz six sniffio -starlette +starlette==0.27.0 typing_extensions tzdata uvicorn