Download examples.py from build-small-hackathon/dental-soap: direct link, hf CLI and curl.
- Browser
- Download file 5.76 kB
-
https://huggingface.co/spaces/build-small-hackathon/dental-soap/resolve/main/examples.py
- Command line
-
hf download hf://spaces/build-small-hackathon/dental-soap/examples.py
-
curl -L -o examples.py https://huggingface.co/spaces/build-small-hackathon/dental-soap/resolve/main/examples.py
5.76 kB
| """Pre-baked demo cases + symptom check groups for the stepper UI.""" | |
| # Step 2 — tooth & dental-work symptoms | |
| STEP2_CHECKS = [ | |
| "Biting pain", | |
| "Hot/cold sensitivity", | |
| "Pain prevents sleep", | |
| "Loose crown or bridge", | |
| "Gum pimple or drainage", | |
| "Bruising or burning pain after root canal", | |
| "Trauma or sudden bite change", | |
| ] | |
| # Step 3 — jaw, bite & TMJ signals | |
| STEP3_CHECKS = [ | |
| "Limited opening or locked jaw", | |
| "Jaw pain with chewing that improves with rest", | |
| "Chest pain or jaw pain with exertion", | |
| "Vision/scalp tenderness/new severe headache", | |
| ] | |
| # Step 4 — whole-body safety signals | |
| STEP4_CHECKS = [ | |
| "Facial or gum swelling", | |
| "Rapidly spreading swelling", | |
| "Fever or feeling very unwell", | |
| "Breathing or swallowing issue", | |
| "Numbness or neurologic symptoms", | |
| ] | |
| CHECK_OPTIONS = STEP2_CHECKS + STEP3_CHECKS + STEP4_CHECKS | |
| EXAMPLES = { | |
| # The builder's real three-month case, de-identified. The dated arc (March | |
| # extraction + sinus repair -> high crown -> five failed adjustments -> crown | |
| # removed mid-May -> ENT-confirmed sinus infection) is what the timeline | |
| # section is designed to carry, and "adjusted five times" deliberately fires | |
| # the repeated_adjustments_without_relief discussion rule — the rule exists | |
| # because it happened to him. | |
| "ahmed": { | |
| "label": "Ahmed's real crown/TMJ/sinus case", | |
| "name": "Ahmed (de-identified)", | |
| "age": 38, | |
| "language": "Bilingual", | |
| "chief_concern": "Bite, jaw/TMJ, and sinus pain after extraction, root canal, and crown work", | |
| "tooth_or_area": "Upper molars, both sides; the crown side is upper left", | |
| "recent_dental_work": "Extraction with sinus repair, root canal, crown placement, five bite adjustments, crown removed mid-May", | |
| "duration": "Three months, evolving since March", | |
| "pain_score": 6, | |
| "meds": "Antibiotic course and a nasal spray for the sinus infection (started this week)", | |
| "allergies": "", | |
| "goals": "Find out whether the bite, the uncovered tooth, the jaw muscles, or the sinus is driving the pain — and what must happen before a new crown", | |
| "checks": [ | |
| "Biting pain", | |
| "Hot/cold sensitivity", | |
| "Limited opening or locked jaw", | |
| ], | |
| "story": ( | |
| "In March I had an upper molar extracted with an immediate sinus repair, plus a root canal and a new " | |
| "crown on the opposite side. The crown felt high from day one, the molar behind it was adjusted five " | |
| "times, and my bite still feels wrong. In mid-May the crown was removed to let things settle, and that " | |
| "tooth is still uncovered. Since then I chew with a bruised feeling and get jaw/TMJ soreness that " | |
| "spreads toward the temple and ear, worst in the morning. This week an ENT confirmed a sinus infection " | |
| "on the left side and started treatment. No trouble breathing or swallowing, and no facial swelling. " | |
| "I have my April CBCT files on a USB. I want the dentist to check whether the bite, the uncovered " | |
| "tooth, the jaw muscles, or the sinus is driving this." | |
| ), | |
| }, | |
| "root_canal": { | |
| "label": "Post-root-canal urgent case", | |
| "name": "Sarah (demo)", | |
| "age": 42, | |
| "language": "English", | |
| "chief_concern": "Severe pain and swelling after root canal", | |
| "tooth_or_area": "Lower right molar", | |
| "recent_dental_work": "Root canal completed four days ago", | |
| "duration": "Four days, worsening since the procedure", | |
| "pain_score": 9, | |
| "meds": "Ibuprofen as directed on package", | |
| "allergies": "Penicillin allergy - rash", | |
| "goals": "Get the swelling and pain assessed urgently and know what needs to happen today", | |
| "checks": [ | |
| "Pain prevents sleep", | |
| "Facial or gum swelling", | |
| "Fever or feeling very unwell", | |
| "Gum pimple or drainage", | |
| ], | |
| "story": ( | |
| "Four days after a root canal on my lower right molar, I now have severe throbbing pain that wakes me up. " | |
| "My gum is swollen and there is a pimple on my gum with a bad taste. I felt feverish last night. I am not " | |
| "having trouble breathing or swallowing." | |
| ), | |
| }, | |
| # Demo note: this example must NOT trigger a hard-interrupt rule — it exists to | |
| # showcase the bilingual handoff card, which only renders when the normal handoff | |
| # path runs. The MRONJ medication prompt ("discuss with dentist" tier) still fires, | |
| # so judges see deterministic safety flags AND the Arabic/English document together. | |
| "arabic": { | |
| "label": "Arabic/English family case", | |
| "name": "Fatma (demo)", | |
| "age": 56, | |
| "language": "Bilingual", | |
| "chief_concern": "Tooth sensitivity and visit prep before a planned extraction", | |
| "tooth_or_area": "Lower left molar", | |
| "recent_dental_work": "No recent dental procedure", | |
| "duration": "A few weeks, worse with cold drinks", | |
| "pain_score": 4, | |
| "meds": "Prolia injection for osteoporosis", | |
| "allergies": "", | |
| "goals": "Bring a clear bilingual summary to the dentist without asking for a diagnosis", | |
| "checks": [ | |
| "Hot/cold sensitivity", | |
| ], | |
| "story": ( | |
| "My mother is 56. One lower tooth has become sensitive to cold drinks over the last few weeks, and the " | |
| "dentist mentioned she may need an extraction. She takes Prolia for osteoporosis. We want an Arabic " | |
| "and English note to bring to the dentist, but we do not want a diagnosis." | |
| ), | |
| }, | |
| } | |