跳到正文
DEV Community· Sanskar Sanskar·· 4 小時前AI 評分38

Afterlight:以本機 AI 保存日常物件回憶的私人檔案庫

build for week 4

AI 導讀

Afterlight 是一款私人、本機運作的回憶檔案庫,使用 Ollama 在筆記型電腦上執行開放權重 Qwen3 1.7B,根據用戶描述生成檔案標籤、反思句和回憶提示問題。原文與生成草稿並列,草稿可編輯,紀錄可匯出或刪除;應用不使用託管 AI API,安裝並下載模型後,設計上可在沒有網絡的情況下運作。

正文

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

Afterlight: An Archive of Ordinary Things

What I Built

A chipped cup can hold a whole Sunday. Afterlight is a private archive for everyday objects that bring someone to mind. You describe an object and write what you remember. A local AI model drafts a museum-style label, a reflective line, and a question that might help you recall more. Your original words remain visible, and you can edit the draft, export your archive, or delete a record.

I interpreted “Ghost in the Machine” as a question about what technology should not do with memory. Afterlight doesn’t simulate someone who has died or put words in their mouth. In the spirit of Día de los Muertos, it helps the living preserve their own stories.

Demo

Afterlight is local rather than publicly deployed. To try it, install Ollama and Python, run ollama pull qwen3:1.7b, then run python server.py from the repository and open http://127.0.0.1:8765. The model needs to be downloaded once; after that, the app is designed to work without internet.

Code

Afterlight on GitHub

Afterlight

A private, local memory archive for ordinary objects and the people associated with them. It invites remembrance in the spirit of Día de los Muertos without impersonating the dead. A local open-weight model turns your own words into a short archive label, a reflective line, and a question. You can edit the model's wording, see your original text, export the archive, or delete a record.

Run

  1. Install Ollama and Python 3.10+.
  2. Download the model once while online: ollama pull qwen3:1.7b.
  3. Start Ollama if it is not already running: ollama serve.
  4. From this directory: python server.py.
  5. Open http://127.0.0.1:8765.

On this Windows machine Ollama 0.40.13 and qwen3:1.7b are already installed. If a fresh shell cannot find ollama, use C:\Users\saans\AppData\Local\Programs\Ollama\ollama.exe (the installer location on this machine). The local server was tested with a real model response. No Python packages or frontend dependencies are required.

After installation and…

The app uses a Python standard-library server and a dependency-free HTML/CSS/JavaScript interface. The repository excludes the local data/ directory so memories aren’t committed with the code.

How I Built It

Ollama runs the open-weight Qwen3 1.7B model on the laptop. The server sends your object and memory to its local chat endpoint and requests a structured response for the three parts of an archive card. The original text and editable draft are saved in a local JSON file. No hosted AI API is involved.

I tested generation with a sample teacup memory, then verified the browser display, editing, deletion, and mobile layout. I removed the sample record afterward.

Why Does Open Innovation Matter?

A cloud API could write a label, but it would require sending an intimate memory to a service I don’t control. Local inference keeps that text on the user’s computer, avoids per-request API charges, and lets me inspect the prompt or swap in another compatible model.

That control mattered in testing: the model embellished the teacup story with a detail the writer hadn’t supplied. I tightened the prompt and made its wording editable, but AI prose remains a fallible suggestion—not historical evidence. The person’s original words are the source of truth. The local archive is not encrypted, so it should not be mistaken for a secure vault.

The Spirit of It

The defining moment wasn’t a ghostly response. It was seeing how easily a plausible AI sentence could change a memory. Afterlight keeps the original beside the draft so the machine can help with expression without becoming the keeper of the story.

來源:DEV Community · dev.to