In creating a recommendation system with python we began by taking some of the recommender we compiled a program that will recommend an artist based on the band name entered.
This is a portion of the recommender:
import pylastkey = 'b8a9a83c0e60d30d237eea0dcdcf055a'secret = 'a0a206e56d580a78e8715155106371fa'sk = ''bandName=input('Please enter band name:')
artist = pylast.Artist(bandName, key, secret, sk)
similar = artist.get_similar()print similar
tracks = artist.get_top_tracks()
print "\n"print "\n"print "\n"print tracks
Sunday, February 8, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment