Download app/views/about.py from PYTHAI/drAIML: direct link, hf CLI and curl.
- Browser
- Download file 3.36 kB
-
https://huggingface.co/spaces/PYTHAI/drAIML/resolve/main/app/views/about.py
- Command line
-
hf download hf://spaces/PYTHAI/drAIML/app/views/about.py
-
curl -L -o about.py https://huggingface.co/spaces/PYTHAI/drAIML/resolve/main/app/views/about.py
3.36 kB
| from pathlib import Path | |
| import streamlit as st | |
| from draiml import __version__ | |
| from draiml.safety import CRISIS_LINES | |
| st.title("⚕️ About drAIML") | |
| st.markdown(f""" | |
| **drAIML {__version__}** — *(A)rtificial (I)ntelligence (M)achine (L)earning* healthcare consultation, rebuilt | |
| on the open Hugging Face ecosystem as a free, open resource for patients and clinicians. | |
| **How it works** | |
| 1. **Triage first.** Your words are checked for emergency red flags (cardiac, stroke, breathing, bleeding, | |
| anaphylaxis, poisoning, mental-health crisis, sepsis, obstetric, neurological) *before* any model runs. | |
| 2. **Evidence.** BM25 retrieval over {{n}} openly licensed passages (PubMedQA, MedMCQA, MedQA, medical-o1, | |
| MedReason, MedText, physiotherapy evidence Q&A, rehabilitation assessments, sports & fitness, exercise | |
| libraries) — the answer cites them as [1], [2]… | |
| 3. **Modes.** General medicine, **physiotherapy & sports therapy** (red-flag screening, graded exercises and | |
| self-care), or **psychotherapy support** (listening, CBT-style self-help, crisis resources first). | |
| 4. **Consultation.** Your choice of open model: dozens of hosted engines via HF Inference Providers, or medical | |
| specialists (II-Medical, HuatuoGPT-o1, Baichuan-M2, BioMistral, MediPhi, Meditron-FO…) on your own machine — | |
| or **Bonsai in this browser**: after you accept drAIML's Agreement, prism-ml's Bonsai-1.7B (1-bit, Apache-2.0, | |
| 248 MB, sha256-pinned) runs on your own CPU through the [browseML](https://github.com/browseML/browseML) | |
| engine (bankML on WebAssembly). Free, private, no key; each answer carries a bankML receipt. | |
| 5. **Hippocratic review.** v1's principle checks — do no harm, beneficence, autonomy, confidentiality — score | |
| every answer and flag its risk level. | |
| **Privacy.** drAIML runs entirely in your browser (Streamlit on WebAssembly via stlite). There is no drAIML | |
| server: no conversation is stored or logged anywhere. Your messages go only to the model provider you pick — or nowhere at all with Bonsai in this browser. | |
| Keys and tokens stay in this browser tab. | |
| **Open source or go away.** Every model shown carries an OSI licence on itself and its base models; every dataset | |
| an OSI, CC-BY or CC0 licence. The rule is enforced in code (`draiml/licences.py`) and re-checked against the live Hub. | |
| **Lineage.** drAIML v1 — the original Streamlit app with OpenAI/Groq/Together/Ollama — lives on at | |
| [github.com/AIMLdr/drAIML](https://github.com/AIMLdr/drAIML) and [aimldr.streamlit.app](https://aimldr.streamlit.app). | |
| 2.0 carries its Hippocratic, logic and medical-pattern modules forward unchanged in spirit. | |
| **Emergencies.** {CRISIS_LINES} | |
| """.replace("{n}", "40,000+")) | |
| with st.expander("The drAIML oath"): | |
| st.text((Path(__file__).resolve().parents[1] / "draiml" / "ported" / "oath.txt").read_text()) | |
| with st.expander("Disclaimer"): | |
| st.markdown("drAIML provides general health information. It cannot examine you, does not diagnose, and does not " | |
| "replace a qualified clinician. Exam-style and synthetic evidence passages are learning material, not " | |
| "clinical guidelines. Always seek professional care for medical decisions, and emergency care for " | |
| "urgent symptoms.") | |
| st.caption("MIT © 2025–2026 Gregory L. Magnusson · PYTHAI · made with luv.pythai.net") | |