Spaces:
Sleeping
Sleeping
OmPrakashSingh1704
commited on
Commit
•
22b9a53
1
Parent(s):
325a3cb
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def get_recommendations(user_description, count_vectorizer, count_matrix):
|
|
66 |
user_vector = count_vectorizer.transform([user_description])
|
67 |
cosine_similarities = cosine_similarity(user_vector, count_matrix).flatten()
|
68 |
similar_indices = cosine_similarities.argsort()[::-1]
|
69 |
-
return similar_indices
|
70 |
@st.fragment
|
71 |
def show_recipe(recipe):
|
72 |
with spinner("HANG TIGHT, RECIPE INCOMING..."):
|
|
|
66 |
user_vector = count_vectorizer.transform([user_description])
|
67 |
cosine_similarities = cosine_similarity(user_vector, count_matrix).flatten()
|
68 |
similar_indices = cosine_similarities.argsort()[::-1]
|
69 |
+
return similar_indices[:5]
|
70 |
@st.fragment
|
71 |
def show_recipe(recipe):
|
72 |
with spinner("HANG TIGHT, RECIPE INCOMING..."):
|