Spaces:
Runtime error
title: Elder Paperwork Co-Pilot
emoji: π
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
app_port: 7860
tags:
- track:backyard
- sponsor:openbmb
- sponsor:nvidia
- sponsor:cohere
- achievement:offgrid
- achievement:offbrand
- achievement:fieldnotes
- achievement:llama
Elder Paperwork Co-Pilot
An offline AI assistant that securely summarizes complex medical paperwork.
π Read our Article
Check out our detailed article about this project here: Elder Care Copilot: Organizing the Chaos of Caregiving Paperwork
About this Project
Idea: An offline-first AI assistant that securely summarizes complex medical paperwork for elder care. Tech: Powered entirely locally to ensure privacy, the app utilizes MiniCPM-V for vision/OCR tasks, MiniCPM-5-1B for triage, NeMoTRON-PARS for table extraction, and Co-Transcribe for ASR. It includes custom themes, Llama.cpp smoke tests, and runs without any outbound network connections.
Standalone Hugging Face Space repo for the elder-paperwork demo.
What this repo contains:
- the split app entrypoint for this repo only
- the shared helper modules needed by the app and its eval runner
- only the demo packs that belong to this split repo
Local run
From the repo root:
python app.py
If you prefer an isolated environment:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python app.py
The app listens on PORT when set; otherwise app.py picks an available local port for local runs.
Trace artifacts are written on every demo-pack load or eval run. Use the Load sample data button in the UI or the eval runner JSON trace_path field to find the file under data/artifacts/<project>/traces/.
Off-brand UI
Custom styling lives in assets/theme.css.
Edit that file to tune the accessible high-contrast palette, spacing, and typography.
The app loads it at launch via Gradio css_paths.
Llama Champion smoke
The main app stays on its normal offline-first path; the badge is satisfied by a dedicated local GGUF smoke that exercises llama-cpp-python end-to-end and writes a small verification artifact.
uses openbmb/MiniCPM5-1B-GGUF (MiniCPM5-1B-Q4_K_M.gguf) as the preferred local GGUF because it matches the registry's MiniCPM-5-1B family.
Install dependencies with your normal venv flow; requirements.txt already points pip at the CPU wheel index for llama-cpp-python==0.3.28.
Download the model into models/:
mkdir -p models
huggingface-cli download openbmb/MiniCPM5-1B-GGUF MiniCPM5-1B-Q4_K_M.gguf --local-dir models
Direct smoke from the repo root:
LLAMA_CHAMPION_MODEL=models/MiniCPM5-1B-Q4_K_M.gguf python scripts/llama_champion_smoke.py --artifact-path artifacts/verification/$(date +%F)/llama_champion_smoke.json
The script writes artifacts/verification/<YYYY-MM-DD>/llama_champion_smoke.json by default if you omit --artifact-path.
Pytest wrapper:
LLAMA_CHAMPION_MODEL=models/MiniCPM5-1B-Q4_K_M.gguf .venv/bin/python -m pytest -q tests/test_llama_champion_smoke.py
If the pytest env does not already have llama_cpp, set LLAMA_CHAMPION_PYTHON to the interpreter that does.
Docker
Build the image:
docker build -t all4- .
Run the app container:
docker run --rm -p 7860:7860 all4-
Optional: run the bundled llama.cpp server from the same image with the same GGUF used above:
docker run --rm -p 8080:8080 -v "$PWD/models:/models" --entrypoint llama-server all4- --model /models/MiniCPM5-1B-Q4_K_M.gguf --host 0.0.0.0 --port 8080
Notes:
- The image is CPU-only and multi-stage; it builds llama.cpp in a builder stage and keeps the runtime stage lean.
.venv/is ignored by the Docker build context, so local virtualenvs do not get baked into the image.- The app and llama-server share the same image but are launched separately.
Offline verification
Run the bundled offline smoke check from the repo root:
bash scripts/offline_smoke.sh
CI-friendly pytest wrapper:
python -m pytest -q tests/test_offline_smoke.py
Docker variant with outbound networking disabled:
docker run --rm --network none -v "$PWD:/repo" -w /repo all4- bash scripts/offline_smoke.sh
The smoke check loads a bundled demo pack, blocks socket/HTTP client creation, and fails if any runtime code tries to reach the network.
Sponsor model policy gate
Run the repo-local sponsor gate without Docker:
python scripts/check_sponsor_model_policy.py
pytest -q tests/test_sponsor_model_policy.py
The gate checks that the registry matches the four planned sponsor components before any packaging or Docker verification step.
Field notes
See FIELD_NOTES.md for the badge artifact, evidence notes, and next steps.
Sharing traces
Use python scripts/share_traces_to_hf_dataset.py <traces-dir> to materialize a deterministic JSONL + metadata bundle under artifacts/verification/<YYYY-MM-DD>/sharing_is_caring/all4--elder-paperwork/.
- The default mode is local-only; pass
--pushplus--repo-idandHF_TOKENto publish a Hugging Face Dataset bundle. --dry-runforces offline materialization even when--pushis present.- See
CHANGELOG.mdfor the latest trace-sharing notes.
Submission assets
Fill these TODO fields before final submission; they are placeholders only and do not imply the assets already exist.
- TODO Hugging Face Space URL (build-small org):
<SPACE_URL> - TODO Public GitHub repo URL:
<REPO_URL> - TODO Demo video URL:
<VIDEO_URL> - TODO Social post URL:
<SOCIAL_POST_URL> - TODO Concise disclaimer: synthetic/repo-authored demo packs only; no PII/PHI.
- TODO Sponsor model attribution list:
- OpenBMB MiniCPM-V 4.6:
openbmb/MiniCPM-V-4_6forocr_vlm - OpenBMB MiniCPM-5 1B:
openbmb/MiniCPM-5-1Bfortriage_llm - NVIDIA NeMoTRON-PARS:
nvidia/NeMoTRON-PARSfortable_parser - CoExpression Labs Co-Transcribe 2B:
CoExpressionLabs/co-transcribe-2bforasr
- OpenBMB MiniCPM-V 4.6:
Models and data attributions
- The bundled demo packs are synthetic or repo-authored and are licensed CC0-1.0 unless a subfolder README says otherwise.
- The sponsor-required registry entries are the four models listed above; keep
configs/model_registry.yamlandconfigs/sponsor_model_policy.yamlaligned if you change them. - The shared
summary_llmhelper also usesopenbmb/MiniCPM-5-1B, but it is not part of the sponsor gate. - The sample GGUF above is only an example; use a model whose license and size are suitable for your deployment.
- No PII/PHI is included in the shipped demo packs.