GithubHelp home page GithubHelp logo

playlistgenius's Introduction

PlaylistGenius

Description:

Spotify Playlist Curation Tool that transforms how users experience their music libraries. Traditional playlist organization methods based on simple genres or artist names don't always capture the nuanced vibes listeners seek. The tool analyzes users' existing playlists, generates dynamic categories based on song metadata and genres, and curates new, personalized playlists tailored to diverse listening preferences by leveraging LLM capabilities.

Installation Instructions

1. Prerequisites

- Python version 3.10+
- NodeJs version 22

2. Clone this repository

3. Installing the dependencies

Install for Macbooks

cd server
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

cd ..
cd web
npm ci

Install for Windows

cd server
python -m venv venv
Set-ExecutionPolicy Unrestricted -Scope Process (This would allow running virtualenv in the current PowerShell session.)
venv\Scripts\activate
pip install -r requirements.txt

cd ..
cd web
npm ci

4. Configuration

Create .env file with the following content:

CLIENT_ID=...
CLIENT_SECRET=...
REDIRECT_URI=http://localhost:3000
OPENAI_API_KEY=...

5. Execution

Open two terminals or powershells

Terminal 1:

python app.py

Terminal 2:

npm start

6. Unit Tests

To run the unit tests

# navigate to the test folder 
cd tests/unit/

# run the test 
pytest test_unit.py

How to use

  1. Click on "Login to Spotify" in the center of the page and log in to your Spotify account.
  2. Choose a playlist you want to classify. The playlist name and the number of songs will be displayed on the left and right sides.
  3. Select the number of categories you want to classify, which should not exceed the number of songs in the playlist. Click on the "Generate" button to generate category names and descriptions based on your selection.
  4. Wait for the AI classification to complete. You can track the progress of the classification from the progress bar at the top.

Video showcasing the features

demo_vid.webm

Video Link to showcase the features

playlistgenius's People

Contributors

nowfuture011130 avatar shreyans0102 avatar chatsam avatar parth-03 avatar

Watchers

 avatar

playlistgenius's Issues

Error handling

The most common error:

Finished chain.
41%|███████████████████████████████████▋ | 41/100 [01:33<02:14, 2.28s/it]
Debugging middleware caught exception in streamed response at a point where response headers were already sent.
Traceback (most recent call last):
File "C:\Workspace\College\Spring2024\cs520\final\PlaylistGenius\server\venv\lib\site-packages\werkzeug\wsgi.py", line 256, in next
return self._next()
File "C:\Workspace\College\Spring2024\cs520\final\PlaylistGenius\server\venv\lib\site-packages\werkzeug\wrappers\response.py", line 32, in _iter_encoded
for item in iterable:
File "C:\Workspace\College\Spring2024\cs520\final\PlaylistGenius\server\venv\lib\site-packages\flask\helpers.py", line 113, in generator
yield from gen
File "C:\Workspace\College\Spring2024\cs520\final\PlaylistGenius\server\lib.py", line 368, in stream_categorization
category_number, category_name, reasoning = categorize_track(categories_output, track)
File "C:\Workspace\College\Spring2024\cs520\final\PlaylistGenius\server\lib.py", line 293, in categorize_track
raise ValueError("Failed to extract category information from LLM output")
ValueError: Failed to extract category information from LLM output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.