brendabor commited on
Commit
fb2d8d2
1 Parent(s): 36a1daa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -27,14 +27,11 @@ df = df.drop(['Unnamed: 0', 'lyrics_filename', 'analysis_url', 'track_href', "ty
27
  similarity_matrix = np.load('similarity_matrix.npy')
28
 
29
  # Load the content-based recommendation function
30
- recommend_cont = joblib.load('recommendation_cont_function.joblib')
31
 
32
  # Load the hybrid recommendation function
33
  hybrid_recommendation = joblib.load('hybrid_recommendation_function.joblib')
34
 
35
- # Load the content-based recommendation function
36
- recommend_cont = joblib.load('recommendation_cont_function.joblib')
37
-
38
  # Load the KNN model
39
  knn = joblib.load('knn_model.joblib')
40
 
@@ -77,7 +74,7 @@ padded_sequence = pad_sequences(sequence, maxlen=50)
77
  emotion = emotion_model.predict(padded_sequence).flatten()
78
 
79
  # Combine emotion and audio features for recommendation
80
- combined_features_hybrid = np.concatenate([emotion, query_data[audio_feature_columns].values])
81
 
82
  # Generate recommendations using the hybrid model
83
  hybrid_recs = hybrid_recommendation(song_index=0)
 
27
  similarity_matrix = np.load('similarity_matrix.npy')
28
 
29
  # Load the content-based recommendation function
30
+ recommend_cont_func = joblib.load('recommendation_cont_function.joblib')
31
 
32
  # Load the hybrid recommendation function
33
  hybrid_recommendation = joblib.load('hybrid_recommendation_function.joblib')
34
 
 
 
 
35
  # Load the KNN model
36
  knn = joblib.load('knn_model.joblib')
37
 
 
74
  emotion = emotion_model.predict(padded_sequence).flatten()
75
 
76
  # Combine emotion and audio features for recommendation
77
+ combined_features_hybrid = np.concatenate([emotion, query_data[audio_features.columns].values])
78
 
79
  # Generate recommendations using the hybrid model
80
  hybrid_recs = hybrid_recommendation(song_index=0)