Original implementation of "Automatic, Personalized, and Flexible Playlist Generation using Reinforcement Learning".
- python3
You can check and install other dependencies in requirements.txt
$ pip3 install -r requirements.txt
# to install TensorFlow, you can refer to https://www.tensorflow.org/install/
The following are files you should prepare to train this playlist generation model. Besides, you can check sample files we prepare as a reference of formats.
[date_of_created_playlist] [song_id1] [song_id2] ....
# embedding: [value1 value2 value3 ...]
[song_id] [value1] [value2] [value3] ...
[song_id] [popularity_score] [artist_id] [release_date]
[seed_song_id]
You can add argument --debug 1
for each mode to check everything is fine
before you prepare your own data.
# files mentioned above should be created first
$ ./prepare_data.sh
$ python3 main.py --mode pretrain [--debug 1]
$ python3 main.py --mode rl [--debug 1]
# input file: results/in.txt
# output file: results/out.txt
$ python3 main.py --mode test [--debug 1]
If you would like some different settings for this model, you can refer to lib/config.py.