Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -64,6 +64,10 @@ knn_recs = recommend_knn(song_index_to_recommend)
|
|
64 |
|
65 |
# Display the predicted emotion and recommendations
|
66 |
st.write(f"Predicted Emotion: {emotion}")
|
67 |
-
|
68 |
-
|
69 |
-
st.write(
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
# Display the predicted emotion and recommendations
|
66 |
st.write(f"Predicted Emotion: {emotion}")
|
67 |
+
|
68 |
+
if not knn_recs.empty:
|
69 |
+
st.write("KNN Recommendations:")
|
70 |
+
for index, row in knn_recs.iterrows():
|
71 |
+
st.write(f"Song Index: {index}, Title: {row['title']}, Artist: {row['artist']}, Score: {row['score']}")
|
72 |
+
else:
|
73 |
+
st.write("No KNN Recommendations found."
|