Skip to content

momorosa/OpenAI_Spotify_Playlist_Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify Playlist Generator

This is a command-line tool that generates a Spotify playlist based on a user prompt using OpenAI and Spotify APIs.

Features

  • Generate a playlist based on a text prompt.
  • Add generated songs to your Spotify account.
  • Future plans to create a web app interface.

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/spotify-playlist-generator.git
cd spotify-playlist-generator
  1. Create and activate a virtual environment:
python3 -m venv env
source env/bin/activate  # On Windows, use `env\Scripts\activate`
  1. Install the required dependencies:
pip install -r requirements.txt
  1. 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-secret

Usage

Run 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)

Future Plans

Develop a simple web app interface using Flask, HTML, CSS, and JavaScript.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages