brendabor commited on
Commit
4b6c2b9
1 Parent(s): e9335b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -45,9 +45,6 @@ song_index_to_recommend = st.number_input('Enter song index:', min_value=0, max_
45
  # Combine emotion and audio features for recommendation
46
  #combined_features = np.concatenate([emotion, audio_features_scaled_knn[song_index_to_recommend]])
47
 
48
- if not knn_recs.empty:
49
- st.write("KNN Recommendations:")
50
- for index, row in knn_recs.iterrows():
51
- st.write(f"Song Index: {index}, Title: {row['title']}, Artist: {row['artist']}, Score: {row['score']}")
52
- else:
53
- st.write("No KNN Recommendations found.")
 
45
  # Combine emotion and audio features for recommendation
46
  #combined_features = np.concatenate([emotion, audio_features_scaled_knn[song_index_to_recommend]])
47
 
48
+ st.write("KNN Recommendations:")
49
+ for index in knn_recs.index:
50
+ st.write(f"Song Index: {index}, Title: {df.iloc[index]['title']}, Artist: {df.iloc[index]['artist']}, Score: {knn_recs.loc[index, 'score']}")