Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -73,7 +73,7 @@ def get_similar_and_recommend(input_text):
|
|
73 |
]
|
74 |
dot_products[given_video_index] = -float("inf") # Exclude the most similar video
|
75 |
|
76 |
-
top_10_indices = np.argsort(dot_products)[
|
77 |
return [df.iloc[idx].to_dict() for idx in top_10_indices]
|
78 |
|
79 |
top_10_recommended_videos_features = recommend_top_10(most_similar_index, all_video_embeddings)
|
|
|
73 |
]
|
74 |
dot_products[given_video_index] = -float("inf") # Exclude the most similar video
|
75 |
|
76 |
+
top_10_indices = np.argsort(dot_products)[::-1][:10]
|
77 |
return [df.iloc[idx].to_dict() for idx in top_10_indices]
|
78 |
|
79 |
top_10_recommended_videos_features = recommend_top_10(most_similar_index, all_video_embeddings)
|