IshmamF commited on
Commit
d99bf7c
1 Parent(s): 3126f4f

Update song_matching.py

Browse files
Files changed (1) hide show
  1. song_matching.py +3 -3
song_matching.py CHANGED
@@ -11,13 +11,13 @@ 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,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]
21
 
22
  # Calculate the score range
23
  score_min = max(0, user_sentiment_score - score_range)
 
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):
15
 
16
  # New: Define inputVector here
17
+ inputVector = self.sim_model.encode(user_input)
18
 
19
  # Filter songs with the same sentiment label
20
+ matched_songs = self.songs_df[self.songs_df['sentiment'] == user_sentiment_label]
21
 
22
  # Calculate the score range
23
  score_min = max(0, user_sentiment_score - score_range)