Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -79,8 +79,8 @@ def get_similar_and_recommend(input_text):
|
|
79 |
]
|
80 |
dot_products[given_video_index] = -float("inf")
|
81 |
|
82 |
-
|
83 |
-
return [df.iloc[idx].to_dict() for idx in
|
84 |
|
85 |
top_10_recommended_videos_features = recommend_next_10_videos(most_similar_index, all_video_embeddings)
|
86 |
|
|
|
79 |
]
|
80 |
dot_products[given_video_index] = -float("inf")
|
81 |
|
82 |
+
top_10_indices = np.argsort(dot_products)[::-1][:10]
|
83 |
+
return [df.iloc[idx].to_dict() for idx in top_10_indices]
|
84 |
|
85 |
top_10_recommended_videos_features = recommend_next_10_videos(most_similar_index, all_video_embeddings)
|
86 |
|