跳到正文
DEV Community· Md Shahbaz Hashmi Ansari·· 3 小時前AI 評分38

Madarbulb:以 Gemma 4 在瀏覽器中建立私密追思祭壇

Madarbulb: a private remembrance builder with Gemma 4 running in your browser

AI 導讀

Madarbulb 使用 Gemma 4 E4B,在瀏覽器內生成追思文字和 calaverita,並呈現在虛擬祭壇上。應用程式透過 WebGPU 和 LiteRT-LM 執行模型,模型檔案由用戶從裝置選取,不會上載或複製到應用程式儲存空間。追思內容和照片無須傳送至託管 AI 服務;應用程式亦可在裝置上備妥程式和模型檔案後離線運作。

正文

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

What I Built

Madarbulb is a private Día de los Muertos remembrance builder. You enter a loved one’s name and a memory, with optional details like their favorite food, song, and photo. Gemma 4 writes a short remembrance and a gentle calaverita, then the app presents them on a candlelit virtual ofrenda decorated with marigolds, papel picado, candles, and offerings.

I interpreted “Ghost in the Machine” as a way to remember people with care while keeping their stories and photos close. The model helps shape a tribute, but it writes about the person in the third person and only uses details the user shares.

Demo

Demo: https://ofrenda-rho.vercel.app/

Code

Repository: https://github.com/ShahbazCoder1/-OFRENDA

How I Built It

Madarbulb is a Next.js App Router app built with TypeScript and Tailwind CSS. It runs Gemma 4 E4B through LiteRT-LM’s browser API using WebGPU. Instead of downloading the model from the app, the user selects the .litertlm file already on their device. The browser passes that file directly to LiteRT-LM; it isn’t uploaded or copied into app storage.

Each generation uses a fresh conversation and a separate prompt. The first streams a 90–140-word remembrance; the second streams a 6–8-line affectionate calaverita. Both prompts tell the model not to impersonate the deceased or invent details. The app also supports English and Spanish, resizes an optional portrait in the browser, saves ofrendas in localStorage, and exports the finished altar as text or PNG.

Why Does Open Innovation Matter?

These stories and photographs are personal. Local inference means they don’t need to be sent to a hosted AI service. There’s no account, API key, or per-generation inference charge, and the project can run without internet access after the app and model file are available on the device.

Using an open model also gives the project room to change. The model can be swapped for another compatible option, such as a smaller Gemma variant, based on the device. A closed hosted API could provide text generation, but would require trusting another service with private memories and photos.

The Spirit of It

The altar makes the generated words feel connected to the details around them: a portrait, a favorite song, or a dish someone remembers. The model doesn’t speak as the person who died. It helps the living make a small space for remembering them.

來源:DEV Community · dev.to