Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,10 @@ def get_similar_and_recommend(input_text):
|
|
63 |
most_similar_index = np.argmax(similarities)
|
64 |
|
65 |
# Get all features of the most similar video
|
66 |
-
|
|
|
|
|
|
|
67 |
for key in unwanted_keys:
|
68 |
if key in most_similar_video_features:
|
69 |
del most_similar_video_features[key]
|
|
|
63 |
most_similar_index = np.argmax(similarities)
|
64 |
|
65 |
# Get all features of the most similar video
|
66 |
+
most_similar_video_features = df.iloc[most_similar_index].to_dict()
|
67 |
+
|
68 |
+
# Exclude unwanted features
|
69 |
+
unwanted_keys = ["text_for_embedding", "embeddings"]
|
70 |
for key in unwanted_keys:
|
71 |
if key in most_similar_video_features:
|
72 |
del most_similar_video_features[key]
|