IshmamF commited on
Commit
b851ff8
1 Parent(s): 78e4c58

Update song_matching.py

Browse files
Files changed (1) hide show
  1. song_matching.py +4 -1
song_matching.py CHANGED
@@ -11,7 +11,10 @@ class SongMatcher:
11
  self.songs_df = pd.read_csv(songs_data_file)
12
  self.sim_model = SentenceTransformer(model_name)
13
 
14
- def match_songs_with_sentiment(user_sentiment_label, user_sentiment_score,inputVector, score_range,songs_df):
 
 
 
15
 
16
  # Filter songs with the same sentiment label
17
  matched_songs = songs_df[songs_df['sentiment'] == user_sentiment_label]
 
11
  self.songs_df = pd.read_csv(songs_data_file)
12
  self.sim_model = SentenceTransformer(model_name)
13
 
14
+ def match_songs_with_sentiment(user_sentiment_label, user_sentiment_score,user_input, score_range,songs_df):
15
+
16
+ # New: Define inputVector here
17
+ inputVector = sim_model.encode(user_input)
18
 
19
  # Filter songs with the same sentiment label
20
  matched_songs = songs_df[songs_df['sentiment'] == user_sentiment_label]