| --- |
| title: Bureaucat |
| emoji: π± |
| colorFrom: pink |
| colorTo: yellow |
| sdk: gradio |
| sdk_version: 6.16.0 |
| python_version: '3.12' |
| app_file: app.py |
| pinned: false |
| license: apache-2.0 |
| short_description: The cat that reads scary Swedish letters for you |
| tags: |
| - track:backyard |
| - achievement:offgrid |
| - achievement:offbrand |
| - achievement:fieldnotes |
| - build-small-hackathon |
| - backyard-ai |
| - off-the-grid |
| - off-brand |
| - field-notes |
| - zerogpu |
| - vision-language-model |
| - sweden |
| models: |
| - Qwen/Qwen3-VL-8B-Instruct |
| --- |
| |
| **π Submission:** [Demo video & launch post on LinkedIn](https://www.linkedin.com/posts/ravinarayansingh_buildsmallhackathon-gradio-huggingface-ugcPost-7472036424997974017-l0HA/) β the demo video is embedded in this post. |
|
|
| # π± Bureaucat |
|
|
| **The cat that reads scary Swedish letters so you don't have to.** |
|
|
| You moved to Sweden. One day a thick envelope arrives from **Skatteverket**. Or **FΓΆrsΓ€kringskassan**. Or β heart rate rising β **Migrationsverket**. It's in formal bureaucratic Swedish, it mentions an amount and a date, and you have no idea if it means *"FYI, everything is fine"* or *"pay 15,600 kr in 30 days or lose your housing allowance."* |
|
|
| Bureaucat reads the letter for you and tells you, at a glance and accurately: |
|
|
| - **How worried to be** β a 1β5 severity verdict driving a **Panic Meter** and a reacting cat-civil-servant mascot |
| - **The short version** β what the letter says, in plain English |
| - **Why you got it** β which authority, and what triggered it |
| - **What you need to do** β a checklist of required actions |
| - **Deadlines & money** β every deadline, amount, and reference number **quoted verbatim from the letter, never invented** |
|
|
| ## π‘ Backyard AI: built for a real person β me |
|
|
| I'm an expat in Sweden. Every letter in the example gallery is a type of letter that has actually landed in my mailbox: tax decisions (slutskattebesked), benefit completion requests (komplettering), residence-permit document requests, CSN repayment demands, vΓ₯rdcentral appointment summons. The first user test was me, on my own mail. The app is stateless by design β nothing is stored, nothing leaves the Space. |
|
|
| ## π€ Small model, honest fit |
|
|
| One model does everything β OCR, reasoning, and explanation in a single pass: |
|
|
| | | | |
| |---|---| |
| | Model | [`Qwen/Qwen3-VL-8B-Instruct`](https://huggingface.co/Qwen/Qwen3-VL-8B-Instruct) (~9B params β well under the 32B cap) | |
| | Decoding | **Greedy** (`do_sample=False`) β deterministic output for an accuracy-critical tool | |
| | Inference | Entirely in this Space on ZeroGPU. **No cloud APIs.** | |
|
|
| The model was chosen by a bake-off, not vibes: Qwen2.5-VL-7B vs Qwen3-VL-8B on a gold set of five synthetic Swedish authority letters with an automated evaluation harness (`eval/run_eval.py`). The smaller 7B model dropped reference numbers (3/5 pass); the 8B passed 5/5 with **zero invented values and 100% recall** β so per "smallest model that passes," the 8B won. |
|
|
| ## π‘οΈ The anti-hallucination contract |
|
|
| Inventing a deadline is the single worst failure this app can have. So: |
|
|
| 1. The model first **transcribes** the letter, then extracts β every value in "Deadlines & money" must be a **verbatim substring of its own transcription**, checked by a pure-Python grounding pass (no second model call). |
| 2. If a value isn't in the letter, the answer is **"None found."** β never a guess. |
| 3. The eval gate (zero invented values, 100% recall, severity parseable, beginner-mode invariance) runs on every gold letter, plus **adversarial fixtures**: a blurry photo, a grocery receipt, and a non-Swedish letter must all be *refused*, not analyzed. |
|
|
| ## π How to use it |
|
|
| **Upload a saved file** β a photo (JPEG/PNG) or a PDF of your letter, multi-page supported. Bureaucat does **not** use your camera or take live photos; snap the letter with your phone first, then upload the image or PDF here. One upload uses one short ZeroGPU call. |
|
|
| The example gallery at the bottom of the app contains **pre-computed analyses** β tap any of the five letters and the full result loads instantly at **zero GPU cost**, no upload needed. |
|
|
| *Why synthetic examples?* Real authority letters are full of personal data (names, personnummer, amounts) and can't be published β and the official "example" documents authorities publish are info sheets without the personalized deadlines/amounts that make a letter scary. So the gallery letters are **faithful synthetic recreations** of the five letter types, with realistic Swedish layouts, diacritics, and values β built so nobody's real mail ends up in a public repo. Every letter shown in the app and in the demo video is one of these synthetic mock-ups β I tested Bureaucat privately on my own real Swedish mail, which never gets published. |
|
|
| ## π
Badges claimed |
|
|
| - **Off the Grid** β no cloud APIs; the 9B VLM runs entirely in this Space |
| - **Off-Brand** β custom frontend via `gr.Server` |
| - **Field Notes** β build report: what greedy decoding revealed that sampling had masked |
|
|
| ## βοΈ Privacy & disclaimer |
|
|
| - **Stateless:** letters are processed in-memory and never stored. Still β redact your personnummer before uploading if you can. |
| - **Not legal advice.** Bureaucat helps you understand a letter; always verify deadlines against the original and contact the authority if unsure. |
|
|
| --- |
|
|
| *Built by an expat, for expats, with one small cat-shaped model.* πΎ |