server/client recom.. connection 👍

This commit is contained in:
Mann Patel
2025-04-03 12:15:32 -06:00
parent 99f12319d5
commit ac099da486
4 changed files with 6 additions and 8 deletions

View File

@@ -1,7 +1,6 @@
# pip install mysql.connector
import mysql.connector
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import numpy as np
import logging
@@ -108,6 +107,3 @@ def get_recommendations(user_id, top_n=40):
except Exception as e:
logging.error(f"Recommendation error for user {user_id}: {str(e)}")
# return get_popular_products(top_n) # Fallback to popular products
get_recommendations(1)