This is a command-line tool that generates a Spotify playlist based on a user prompt using OpenAI and Spotify APIs.
- Generate a playlist based on a text prompt.
- Add generated songs to your Spotify account.
- Future plans to create a web app interface.
- Clone the repository:
git clone https://github.com/yourusername/spotify-playlist-generator.git
cd spotify-playlist-generator- Create and activate a virtual environment:
python3 -m venv env
source env/bin/activate # On Windows, use `env\Scripts\activate`- Install the required dependencies:
pip install -r requirements.txt- Create a .env file in the root directory and add your environment variables:
OPENAI_API_KEY=your-openai-api-key
SPOTIPY_CLIENT_ID=your-spotify-client-id
SPOTIPY_CLIENT_SECRET=your-spotify-client-secretRun the script with the required arguments:
python app.py -p "songs for a rainy day" -n 5-p: The prompt describing the playlist. -n: The number of songs to be added (default is 12)
Develop a simple web app interface using Flask, HTML, CSS, and JavaScript.
This project is licensed under the MIT License. See the LICENSE file for details.