--- title: Patient Virtuel · Français en médecine dentaire emoji: 🦷 colorFrom: red colorTo: gray sdk: gradio sdk_version: 6.16.0 app_file: src/server_app.py pinned: false license: apache-2.0 tags: - hackathon - build-small-hackathon - backyard-ai - voice-ai - french-learning - dental - gradio - modal - llama-cpp - gemma - track:backyard - sponsor:modal - achievement:offgrid - achievement:offbrand - achievement:llama - achievement:sharing - achievement:fieldnotes --- # Patient Virtuel · Français en médecine dentaire Hackathon submission for [build-small-hackathon](https://huggingface.co/build-small-hackathon). **Track**: Backyard AI — a real tool for a real learner: a dental hygienist training professional French. Uses `gradio.Server` with a custom HTML/CSS/JS frontend (Off-Brand Award entry). **Llama Champion badge**: Model runs through the llama.cpp runtime via `llama-cpp-python` with flash attention and L4 GPU optimizations. **Off the Grid badge**: Zero cloud APIs. STT → faster-whisper (local), LLM → Gemma 4 (local), TTS → piper-tts (local neural, `fr_FR-siwis-medium` voice). See [`space_README.md`](space_README.md) for the full description. 📖 [Field Notes](FIELD_NOTES.md) — architecture decisions, lessons learned, and the story behind the app. 📡 [Agent Trace](https://huggingface.co/datasets/build-small-hackathon/patient-virtuel-trace) — curated build log on HF Hub (Sharing is Caring badge). [Demo video](https://youtu.be/oP3KrlZFUPk) · [LinkedIn post](https://www.linkedin.com/posts/carlosduplar_my-wife-is-a-dentist-re-entering-the-workforce-activity-7471897489332289536-p5Ne) ## Architecture ``` src/ server_app.py → gr.Server backend (API endpoints) core.py → Shared session logic llm_engine.py → Gemma 4 26B-A4B via Modal (llama.cpp runtime) stt_engine.py → faster-whisper via Modal tts_engine.py → piper-tts (local neural, fr_FR-siwis-medium) prompts.py → System prompts parse_feedback.py → Feedback parsing frontend/ custom_index.html → Custom vanilla HTML/CSS/JS frontend style.css → Styles modal/ modal_app.py → Modal deployments (llama.cpp + CUDA) ``` ## Running locally ```bash pip install -r requirements.txt python src/server_app.py ``` ## Deploying to HF Spaces The Space uses `space_README.md` as its README and `src/server_app.py` as the entry point.