DEV Community

Cover image for Ofrenda: A Private Altar for My Grandfather, Built With Local Gemma
Diptanil Sen
Diptanil Sen

Posted on

Ofrenda: A Private Altar for My Grandfather, Built With Local Gemma

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

My grandfather couldn't speak. A throat problem took his voice, but he never needed it. He told us everything with his face: pride, worry, a joke, a scolding. We learned to read him the way you learn a language.

For this week's theme I didn't want to build something spooky. I wanted to build something that honors him.

Ofrenda is a small tool for making a Día de los Muertos altar for someone you've lost. You type their name, who they were to you, their favorite foods, their favorite songs, and a few memories. Gemma writes a short remembrance and a one-line epitaph from only what you gave it. Then the page lays it all out as an altar: marigolds along the top, your own photo in a frame, flickering candles, and the offerings (his sweet chai, his pakora, old Kishore Kumar songs) listed underneath. There's also a short list of questions the family can ask each other, to save the stories nobody has written down yet.

It has a print button, so the altar can sit on a shelf as well as on a screen.

Demo

Code

Ofrenda

Build a candlelit Dia de los Muertos altar for a loved one. Gemma (local, via Ollama) writes the remembrance from the details you give it. Your photo and stories never leave your computer. Run: pip install -r requirements.txt && python -m uvicorn app:app --port 8004 (open http://127.0.0.1:8004)




How I Built It

  • Model: Gemma 3, an open-weight model, running on my own laptop through Ollama.
  • Backend: a small FastAPI app in Python. It puts what you typed into a careful prompt and asks Gemma for JSON: an epitaph, a remembrance, a list of offerings and some questions.
  • The rule I cared most about: the prompt tells the model to use only the details I gave it and never to invent memories. A made-up story about someone you loved is worse than no story, so I want it to stay close to what's true.
  • Frontend: one HTML page. The candles are plain CSS animations (they stop if your system asks for reduced motion). Your photo is shown straight from your browser and is never uploaded anywhere.
  • A bug I hit: my first real run failed with a "messy answer" error. The model's JSON had a stray comma and real line breaks inside a string, and my code rejected it. I made the parser forgiving, switched on Ollama's JSON mode, and added up to three retries. Small local models slip like this, so it's worth planning for.

I built the project with AI assistance (Claude), and ran and tested it on my own Ubuntu laptop.

Why Does Open Innovation Matter?

This is the kind of project where I would not use a closed cloud API.

  • It's private. A photo of my grandfather and the way I remember him are not something I want sitting on a company's server. With a local model, they never leave my computer.
  • It works with the lights off. After the model is downloaded, it needs no internet at all.
  • It won't disappear. An altar built on someone else's service can vanish when the service changes or shuts down. This runs on files and weights I own.
  • It costs nothing to run, so I can make one for every person my family wants to remember, as many times as we like.

Top comments (0)