Skip to content

RECOMMENDER · APP

Pick one film, get five more like it

A content-based movie recommender on the TMDB 5000 dataset, with a Streamlit front end. Pick a film and it shows the five most similar ones, with posters from the TMDB API.

The app's answer for Skyfall as title cards: Spectre, Never Say Never Again, Octopussy, Quantum of Solace and Dr. No.

THE GAP

Finding a film like one you enjoyed still means scrolling.

Looking for something like a film you enjoyed usually means a long scroll through titles. I wanted to skip that: name one film and get a short list that shares its story, genres, cast or director.

01

Endless scrolling

Browsing for "something like that one" means paging through titles one at a time.

02

Too many choices

A long list makes it harder to pick anything, not easier.

03

Titles alone

A list of names is hard to scan, so every pick should come with its poster.

WHAT IT DOES

Five picks with posters, from one choice

In a notebook, I describe each film with one bag of words built from its plot overview, genres, keywords, top three cast members and director, then score how similar every pair of films is. The Streamlit app loads those scores, finds your film's row and shows the five closest, each with a poster from the TMDB API.

Content, not ratings

It matches films on what they contain, so it needs no ratings or viewing history.

Names stay whole

Spaces are stripped from names, so Sam Worthington becomes one token instead of two.

Scores computed once

Every pairwise similarity is computed up front, so a recommendation is just a lookup and a sort.

Posters on demand

Each pick makes one TMDB API call for its poster, with a note when there isn't one.

HOW IT WORKS

From one pick to five

  1. 1

    Pick

    Choose a film from a dropdown of every title in the model.

  2. 2

    Ask

    Press Show Recommendations.

  3. 3

    Look up

    The app finds that film's row of similarity scores.

  4. 4

    Rank

    It sorts the row, skips the film itself and keeps the top five.

  5. 5

    Posters

    It asks the TMDB API for each poster and notes any that are missing.

  6. 6

    Browse

    Five titles and posters appear side by side.

SYSTEM DESIGN

A notebook builds it, a small app serves it

All the modeling happens once in a Jupyter notebook. The Streamlit app only loads the saved film list and similarity matrix, then does a lookup per click.

RESULTS

What's behind one click

4,806

movie entries in the model, after dropping 3 with no overview

5,000

most common stemmed terms used as features

23.1M

pairwise similarity scores, computed once (4,806 × 4,806)

5

picks per film, each with a TMDB poster

For Skyfall, the app returns Spectre, Never Say Never Again, Octopussy, Quantum of Solace and Dr. No.

WHAT IT TAUGHT ME

Where it falls short

It only knows words. Films match when they share plot words, genres, keywords, cast or a director, which is why Skyfall brings back five Bond films, and it has no idea what anyone actually enjoyed. Titles aren't unique either, and I joined the two files on title and look films up by title, so the notebook's own test recommends Batman for Batman. And the app drifted from the notebook: it loads two pickle files that the notebook never writes and the repo doesn't include, so a fresh clone needs an export step first.

BUILT WITH

  • Python
  • pandas
  • scikit-learn
  • NLTK
  • Jupyter
  • Streamlit
  • TMDB API

Like what you see?

Thanks for reading. There's more where this came from.