MoodieMovie
A chatbot that gets your movie mood
The problem MoodieMovie solves
1. Effortless Decision-Making 🤔
- What it's for: Quickly finding a movie that satisfies a specific or complex mood, especially for a group or a couple who can't agree.
- How it makes tasks easier: Instead of endlessly scrolling through streaming service grids, a user can simply state what they want in natural language. MoodieMovie's ability to understand negations and multiple moods (e.g.,
"a thriller that isn't too scary"or"a funny romantic movie") allows users to find a perfect compromise in seconds, drastically cutting down on decision time and frustration.
2. Deep Dives for Film Fans 🎬
- What it's for: For users who have just discovered a new favorite actor or director and want to explore more of their work.
- How it makes tasks easier: Rather than opening a new browser tab to search on IMDb or Wikipedia, the user can stay within the app and ask directly:
"movies starring Tom Hanks"or"directed by Christopher Nolan". The chatbot instantly provides a clean, curated list of that person's top-rated films, making it a seamless tool for film enthusiasts to dive deeper into movies they love (to be implemented in future updates).
3. Intelligent Movie Discovery 💎
- What it's for: Finding hidden gems or movies that share a unique "vibe" with a specific favorite film, breaking out of the typical recommendation bubble.
- How it makes tasks easier: Standard recommendations are often based on broad genre tags. MoodieMovie’s "More like this" button uses content similarity, analyzing a movie's plot, themes, cast, and director to find its true thematic siblings. This helps users discover new movies they would have otherwise missed, making the discovery process more intelligent and rewarding.
Challenges we ran into
The Hurdle: The Memory Crash
Our biggest technical hurdle was a critical MemoryError that completely crashed the application during startup. When we first implemented the "More like this" feature, the app would fail to launch, complaining that it was unable to allocate over 15 GiB of RAM, which is far more than what's available on a standard computer or a free cloud server.
The Analysis: Finding the Cause
After investigating, we pinpointed the cause. Our initial approach was to pre-calculate the similarity score between every single movie and every other movie in our dataset. This created a massive 45,000 x 45,000 data table called a cosine similarity matrix.
It was like trying to create a giant spreadsheet with a row and column for every movie—the size grew exponentially and became too large for the system's memory. We realized that pre-calculating every possible similarity score at once was not a scalable solution.
The Solution: On-Demand Calculation
Instead of creating the entire 15 GB matrix at the start, we re-engineered the feature to be calculated on-demand.
- We still pre-process all the movie descriptions into a memory-efficient
TF-IDF matrix. This is a one-time setup that is fast and doesn't consume much RAM. - Now, only when a user clicks the "More like this" button for a specific movie (e.g., Inception), we perform a tiny, lightning-fast calculation. We take the vector for Inception and compare it against all the other vectors in the matrix.
This changed the calculation from a massive (N x N) operation to a tiny (1 x N) operation. This approach fixed the memory crash entirely and made the application stable and scalable, with only a negligible delay when a user requests similar movies.
