NimaKL commited on
Commit
67df04a
·
verified ·
1 Parent(s): e89f25d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- unwanted_keys = ["text_for_embedding", "embeddings"]
 
 
 
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]