Let's talk ↗
← All projects

Bootcamp · Dec 2025

Playlist Chaos

A Streamlit page that sorts a starter catalog into Hype, Chill, and Mixed from energy and genre, then offers a lucky pick.

The page calls itself a smart playlist engine whose behavior is a bit unpredictable. I wanted to see how a catalog actually gets split into moods, so I built the Streamlit page that does the split.

The problem

A single list of songs does not say what to play when you want something loud or something quiet. The person staring at the list ends up skipping, which is a mood picker made of the next button. It was worth a page that asks for a mood profile and then shows its work, including the parts where the work is wrong.

The app keeps the catalog in session state and asks for a favorite genre, a hype energy floor, and a chill energy ceiling. Those three numbers are the whole preference. There is no account behind them.

How I built it

Each song has a title, an artist, a genre, an energy from 1 to 10, and tags. The starter catalog has 22 songs. A song lands in Hype when its genre is the favorite, its energy is at least the hype floor, or the genre contains rock, punk, or party. The floor defaults to 7. It lands in Chill when the energy is at or below the chill ceiling, or the title contains lofi, ambient, or sleep. The ceiling defaults to 3. Everything else is Mixed.

The favorite-genre rule is why a quiet song in your favorite genre can still land in Hype. The rock, punk, and party rule is why a song can be hype without clearing the energy floor. I left both rules visible because they are the classification, not a surprise.

The sidebar can add a song. Tabs show Hype, Chill, and Mixed. A search box filters a tab by artist. Feeling Lucky picks from Hype, Chill, or both, and appends that pick to a history. The page is Streamlit, and the catalog stays in session state so a rerun does not forget the song you just added.

Challenges and what I learned

The stats do not measure what the labels suggest. The hype ratio divides the hype count by itself, so it is 1 whenever any hype song exists. Average energy adds up only the hype songs, then divides by every song. Search keeps a song when the artist string sits inside the query, so a short query can miss the artist and a query that contains the artist can keep them for the wrong reason. Those three choices are why a lucky pick and the stats can disagree.

RECOMMENDED

More like Playlist Chaos