DEV Community

Priyanshi Sharma
Priyanshi Sharma

Posted on

Digital Ofrenda

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

Digital Ofrenda is a private, offline web app for DĂ­a de los Muertos. In Mexican tradition, families build an ofrenda, an altar with candles, marigolds, photos and the favorite foods of people they have lost. I wanted a digital version where the writing is done by a local AI model, so the stories never leave the family's computer.

You fill in a short form: their name, who they were to you, their favorite food and song, one memory you cherish, an optional photo, and the language (English or Español). Then you click Light the candles. The altar's candles flicker on, the food and song appear as offerings, and a remembrance is written word by word on a card. Each remembrance is saved as a text file on your computer, so you can print it or share it with family.

I read "Ghost in the Machine" as the people who live on in stories, not as something scary. The machine is a local model, and the ghost is the memory you give it.

Demo

Live preview (sample only, no AI runs on this page): https://2k24cs1r2510045-gif.github.io/digital-ofrenda/

Full demo with the local model running through Ollama:

[DRAG YOUR SCREENSHOT OR SCREEN RECORDING HERE]

Code

GitHub logo 2k24cs1r2510045-gif / Digital-Ofrenda

Offline digital ofrenda that writes a remembrance with a local open-source LLM. Private, free, no API keys. DĂ­a de los Muertos remembrance writer powered by Ollama. Runs fully on your laptop.

How I Built It

Stack: Python (standard library only), one HTML file with CSS and JavaScript, and Ollama running an open-weight model (llama3.2). Nothing else needs to be installed.

How it works

  1. The browser sends the form data to a small Python server on localhost:8000.
  2. The server builds a prompt that tells the model to write in the chosen language and to use only the facts provided, so it doesn't invent details about someone's loved one.
  3. It calls Ollama's local API with streaming turned on and passes each piece of text to the browser as it arrives.
  4. The page shows the text on the card as it streams in, and the server saves the finished remembrance to an ofrendas/ folder.

Features

  • English and Spanish output
  • A dropdown that lists every model installed in Ollama, so you can switch to Qwen, Gemma or Mistral
  • An altar with animated candles, marigolds and papel picado, built in plain CSS
  • Photo shown in the altar frame (displayed in the browser only, never uploaded)
  • Clear error messages if Ollama isn't running or the model isn't installed
  • No external fonts, scripts or images, so it works with the internet off
  • A demo mode, used on the hosted preview, that shows a sample without any AI model

Run it yourself

ollama pull llama3.2
python app.py
# open http://localhost:8000
Enter fullscreen mode Exit fullscreen mode

Why Does Open Innovation Matter?

A remembrance is some of the most personal writing a person does. Sending a grandmother's name and a private memory to a cloud API felt wrong, so open models were the point of this project, not just a convenience.

  • Privacy: names, photos and stories never leave the laptop.
  • Works with the lights off: after the one-time model download, it needs no internet.
  • Free: no API key, no usage fees, no account.
  • Not locked into a service: a closed API can change, get expensive or shut down. A text file on my disk and a model I can download again will still work next year, when the altar goes up again.
  • Swappable: changing the model is one dropdown, so I can use a smaller model on a slow laptop or a better one as new open models appear.

The Spirit of It

[WRITE 1-2 REAL SENTENCES ABOUT A FAMILY MEMBER'S OR FRIEND'S REACTION, OR DELETE THIS WHOLE SECTION]

Steps

Paste the text above into the body.
Replace [DRAG YOUR SCREENSHOT OR SCREEN RECORDING HERE] by dragging in your image or video.
Fix or delete the last section, “The Spirit of It”. Don’t leave the brackets in.
Click Preview and check that the GitHub embed and the images show up.
Click Publish.

Before publishing, make sure of three things:

Your repo digital-ofrenda is public and has app.py, index.html and README.md.
GitHub Pages is turned on, so the live link works. If you haven’t done it yet, delete the “Live preview” line.
The two tags devchallenge and hf26challenge are still at the top.

Top comments (0)