Ofrenda.exe:為機器中的幽靈點亮一支蠟燭
Ofrenda.exe: A Candle for the Ghost in the Machine
Ofrenda.exe 是一款受亡靈節啟發的本機 AI 記憶工具,會根據姓名和一段回憶生成簡短的紀念卡。它透過 Ollama 在本機使用 gemma3:1b,並設有確定性的離線模式;個人回憶保留在用戶裝置上,無須帳戶或互聯網連線。
This is a submission for the Hacktoberfest Open Source AI Challenge Week 4: Ghost in the Machine
What I Built
Ofrenda.exe is a small local AI memory keeper inspired by Día de los Muertos.
You give it a name and one memory. It creates a short remembrance card that feels like a digital candle placed on an ofrenda.
I interpreted the theme as a meeting point between old memories and new technology. The ghost is not a person trapped inside a machine. It is the feeling that a story can disappear unless we choose to keep it alive.
The project runs from the terminal and keeps personal memories on the user's machine.
Demo
Install Ollama and download the small Gemma model:
ollama pull gemma3:1b
ollama serve
Then run:
python3 ofrenda.py "Abuela Rosa" "She taught me to make sweet bread on rainy Sundays."
Example output:
🕯️ OFRENDA FOR ABUELA ROSA
A short remembrance card appears here, written by the local model.
The project also has a deterministic offline mode:
python3 ofrenda.py "My first open source project" "It taught me that unfinished things can still help someone." --offline
Code
The complete source code is available here:
How I Built It
Ofrenda.exe is a single file Python CLI with no third party Python dependencies.
It calls the local Ollama HTTP API with Python's standard library. The prompt asks the model to write a short remembrance without inventing facts or mentioning the prompt.
The project uses the open weight Gemma model locally through Ollama. If the local server is unavailable, the program falls back to a deterministic candlelight mode so the basic experience remains usable.
The main flow is:
- Read a name and a memory from the command line.
- Send the text to the local model.
- Print the remembrance card.
- Use the offline fallback when Ollama is not running.
Why Does Open Innovation Matter?
Memories are private by default.
A closed hosted model could require uploading a person's name, family story, or personal history to a service we do not control. Ofrenda.exe uses local inference instead, so the story can stay on the user's laptop and work without an account or an internet connection.
Open models also make the project replaceable. Users can choose a smaller model for an older laptop, a multilingual model for their family, or a fine tuned model with a different cultural voice.
The application does not depend on one provider's pricing, availability, or personality. A remembrance tool should be able to outlive the service that created it.
The Spirit of It
I wanted the result to feel gentle instead of frightening.
A terminal window is usually associated with commands, logs, and errors. Ofrenda.exe gives it a quieter job. It lets a small memory sit in the light for a moment.
Technology can help us remember without taking the memory away from us.
來源:DEV Community · dev.to