giovannigiofre commited on
Commit
15477ab
·
verified ·
1 Parent(s): f877769

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -86,7 +86,7 @@ def recommend_ui(partial_song_name):
86
  if recommendations is not None:
87
  # Format the recommendations for display
88
  recommendations_formatted = recommendations.to_dict('records')
89
- result = "\n".join([f"{rec['track_name']} by {rec['artist_name']} (Popularity: {rec['popularity']})" for rec in recommendations_formatted])
90
  return result
91
  else:
92
  return "No recommendations could be generated. Please try a different song."
 
86
  if recommendations is not None:
87
  # Format the recommendations for display
88
  recommendations_formatted = recommendations.to_dict('records')
89
+ result = "\n".join([f"{rec['track_name']} by {rec['artists']} (Popularity: {rec['popularity']})" for rec in recommendations_formatted])
90
  return result
91
  else:
92
  return "No recommendations could be generated. Please try a different song."