Recommend songs and import a list of songs to a new or existing playlist in Spotify
MIT License
A Flask web application that allows users to use GPT-4 to generate song recommendations, then create a new Spotify playlist or import to an existing one.
To set up the project, follow these steps:
Clone the repository:
git clone https://github.com/w3bdesign/spotify-import.git
cd spotify-playlist-creator
Install the required packages:
pip install -r requirements.txt
Rename .env.example
to .env
and modify the values accordingly.
Replace the placeholders with your actual Spotify developer credentials and desired redirect URI.
You can obtain your Spotify developer credentials from the Spotify Developer Dashboard.
Deployment is possible via Docker:
git clone https://github.com/w3bdesign/spotify-import.git
cd spotify-import
docker build -t spotify-import .
Start Docker like this:
docker run -d -p 5000:5000 \
-e SPOTIPY_CLIENT_ID=changeme \
-e SPOTIPY_CLIENT_SECRET=changeme \
-e SPOTIPY_REDIRECT_URI=changeme \
-e OPENAI_API_KEY=changeme \
-e OPENAI_API_BASE_URL=changeme \
spotify-import
To run the application locally, execute the following command:
cd app
python main.py
The application will start running on http://127.0.0.1:5000/
.
Open this URL in your web browser to access the Spotify Playlist Creator.