Inspiration

When we were brainstorming ideas for this hackathon, one of the topics that came up was our difficulty to find movies to watch that fit how we were feeling at the time. We thought that recommendations weren't specific to the moment, rather specific to every movie we watched in whatever mood we were in. It started as small talk, but when we weren't sure how to develop another idea, we circled back to this. After some research, we realized that the connotation of words in the timed subtitles could give us a depiction of the emotions the movie would convey without actually spoiling it, and we could filter based off of that. That's what inspired us to take on this project.

What it does

Moodie shows you the emotional shape of a movie before you watch it. It reads a film's subtitles and scores every two minutes of dialogue for joy, sadness, fear, anger, tension and surprise, plus an overall "warm vs. dark" mood. It then draws all of that as an emotional arc across the runtime.

Each film card shows its overall emotion mix and its strongest feeling. You can open a minute-by-minute emotion graph, or a "moodline" that rises when the story turns warm and falls when it turns dark. Filter chips like "Most fear" or "Most joy" re-rank the whole library, so you can find a film by how you want to feel instead of by genre.

How we built it

We used public-domain films, so we could legally use their subtitle files. A Python pipeline parses each .srt file and groups the dialogue into 2-minute windows. Windows are sent to Gemini (gemini-3.5-flash) in batches. We use structured output with a JSON schema, so every response comes back as clean, valid numbers: valence from −1 to 1 and six emotions from 0 to 1. The pipeline retries on rate limits and saves progress after every batch, so an interrupted run picks up where it stopped. Each scored window is a row in a TimescaleDB hypertable on Tiger Data. Movies don’t have real-world timestamps, so we store “minutes into the film” as a time offset from a fixed epoch. That lets us use TimescaleDB’s time-series tools on film runtime. The website is a single-page, Netflix-style UI written in plain HTML and JavaScript, with hand-drawn SVG charts. A small read-only Python server queries Tiger Data and serves the film list and arcs as JSON, so the database password never reaches the browser. Scoring happens ahead of time, so the live site never calls Gemini. The demo is fast and can’t be broken by API limits.

Challenges we ran into

Some of our public-domain subtitle files were auto-transcribed, with garbled lines and non-standard timestamps, and our parser had to handle them without shifting lines out of sync. Keeping four people’s work in sync was also hard. The pipeline, database schema and website were built in parallel, and at one point they each assumed a different data shape, so we cut the schema down to exactly what the website displays and made that the shared contract. We accidentally pushed API keys and the database URL to GitHub. The Gemini key was automatically revoked within minutes, and we learned to keep secrets in local .env files and share them directly. A browser can’t talk to Postgres, so we had to add a small server between the website and the database, without building a whole API framework. Finally, different Python versions and operating systems across the team meant packages that installed on one laptop failed on another.

Accomplishments that we're proud of

We built a full end-to-end pipeline, from raw subtitle file to Gemini to time-series database to interactive chart, working on four real films: His Girl Friday, Midnight Manhunt, Outpost in Morocco and The Little Princess. Every Gemini response matches our schema, so the pipeline never has to guess at the model’s text. We also made a UI that makes an abstract idea, a film’s emotional arc, easy to read at a glance, and we’re proud of using a time-series database for something that isn’t sensor data or stock prices.

What we learned

We learned how to get dependable structured data out of an LLM using JSON schemas, batching and retries, and how TimescaleDB hypertables work, including how to fit non-calendar time like “minute 47 of a movie” into them. We also got an unexpected result: every film we scored averaged slightly on the dark side, including the screwball comedy His Girl Friday. Its rapid-fire arguing reads as conflict when you only see the words. Dialogue alone misses tone of voice, music and visuals, which is a real limit of subtitle-based analysis. Last, we learned the git habits that matter at a hackathon like agreeing on data formats early, never committing secrets, and pulling often.

What's next for Moodie

Next we want to add scene explanations, so you can hover over a peak or dip to see the dialogue behind it and why it scored that way. We also want a draw-a-curve feature, where you sketch the emotional shape you’re in the mood for (say, “starts sad, ends happy”) and get films whose arcs match, plus a compare mode that overlays two arcs on one chart and mood rows like “Edge of your seat” or “Slow-burn to joy.” Beyond that, we want a bigger library and more signal than dialogue alone, such as audio and music cues, to catch tone the words miss.

Built With

Share this project:

Updates

Submission history