Alright, so today I’m gonna spill the tea on my little “kenny love island” project. Don’t ask why I called it that, sometimes code names just…happen, ya know?

First off, I had this idea kicking around in my head for ages. I wanted to build something that could, like, recommend TV shows based on your mood. Sounds kinda cheesy, I know, but I figured it’d be a fun way to learn some new stuff.
Phase 1: Data, data, data!
- Started by scraping IMDb for a ton of TV show info. Genre, ratings, plot summaries, all that jazz. Used Beautiful Soup and Requests in Python. It was a messy job, let me tell you. IMDb’s HTML is a nightmare.
- Then I went hunting for sentiment analysis datasets. Found a decent one on Kaggle with pre-labeled text snippets. Score!
- Cleaned everything up. Removed duplicates, handled missing values, you know, the usual data wrangling stuff. Pandas became my best friend for a while.
Phase 2: Building the Mood Ring (aka Sentiment Analyzer)
- Trained a simple Naive Bayes classifier on the sentiment dataset. Nothing fancy, just wanted a baseline. Scikit-learn made it pretty painless.
- Hooked it up to a basic Flask API. So, you could send it a text snippet (“I’m feeling down”), and it would spit back a sentiment score.
- Tested it out with all sorts of phrases. It was surprisingly good at picking up on sarcasm, which was a bonus.
Phase 3: Marrying Mood to Media
- This was the tricky part. I wanted to link the sentiment score to specific TV show attributes.
- Ended up using TF-IDF to vectorize the plot summaries. Basically, turned the text into numbers that represented the important words in each summary.
- Then I calculated the cosine similarity between the sentiment score vector and the plot summary vectors. Higher similarity = better match.
- Added some weighting based on genre. Like, if you’re feeling “happy,” it’s more likely you want a comedy than a drama.
Phase 4: Show Time! (aka The Demo)

- Built a super simple web interface using HTML, CSS, and a little JavaScript. Just a text box where you could type your mood.
- The JavaScript sent the text to the Flask API, got back the sentiment score, and then fetched the top TV show recommendations.
- Displayed the results on the page with the show title, a brief description, and a link to IMDb.
The Result?
It actually kinda worked! Not perfectly, of course. Sometimes it would recommend shows that were way off, but other times it nailed it. I showed it to a few friends, and they were impressed (or at least pretended to be).
Lessons Learned
- Data cleaning is the real MVP. Garbage in, garbage out.
- Sentiment analysis is surprisingly nuanced. Even a simple model can be pretty effective.
- Flask is awesome for building quick APIs.
- Web design is hard. I’m definitely not a front-end developer.
Next Steps?
I’d love to train a more sophisticated sentiment analysis model, maybe using transformers. And I definitely need to improve the recommendation algorithm. But for now, I’m calling it a win. It was a fun project, and I learned a ton.
So, yeah, that’s the story of “kenny love island.” Hope you found it interesting! Now, if you’ll excuse me, I’m gonna go watch some TV.
