drAIML / docs /USAGE.md
Gregory-L's picture
Bonsai in this browser: drAIML Agreement, browseML engine (bankML on WebAssembly), evidence notes, bankML receipts; cross-origin isolation for threads
23d27dd verified
|
Raw History Blame Contribute Delete
5.05 kB
# How to use drAIML 2.0
Open **https://huggingface.co/spaces/PYTHAI/drAIML**. The first visit takes 20–40 s while Python and Streamlit
load in your browser. After that, everything runs on your own machine: there is no drAIML server.
## 1. Start
![Start screen on the live Space](screenshots/00-start-sign-in.jpg)
Pages: **Consultation**, **Evidence search**, **Models**, **Datasets**, **About · Oath**. On the live Space
the top bar also has **Sign in with Hugging Face**.
## 2. Choose a model
![Choose a hosted model](screenshots/02-choose-hosted-model.jpg)
- **Hugging Face · Inference Providers.** Sign in (top bar) or paste an HF token. ★ marks models recommended
for consultation. Calls bill your own HF account.
- **Groq / Together.** Paste your own key.
- **Your endpoint.** Ollama, vLLM, llama.cpp or an HF Endpoint, for the open medical specialists.
- **Mode.** General medicine · Physiotherapy & sports therapy · Psychotherapy support.
- **Second opinion.** Ask two models side by side.
## 2a. Bonsai in your browser: free, private, no key
![Bonsai selected](screenshots/15-bonsai-sidebar.jpg)
Choose **Bonsai · in this browser** as the source. On your first question drAIML shows its Agreement:
![drAIML Agreement](screenshots/16-bonsai-agreement.jpg)
One click on **I agree** downloads prism-ml's Bonsai-1.7B (1-bit, Apache-2.0, 248 MB) from Hugging Face
once, checks it against its sha256 pin and keeps it in this browser. The
[browseML](https://github.com/browseML/browseML) engine (bankML on WebAssembly) then answers on your own
computer, with drAIML's evidence searched in your browser too. Nothing you type leaves your device.
Each answer carries a bankML receipt, which the page checks against the text it received. Bonsai is a
small model: quick to load and private, but less reliable than large models, so check important things
with a clinician. On a 4-core laptop expect a minute or two before the first words, then a couple of words a second. **Remove** in the sidebar deletes the model
from this browser.
## 3. Emergencies come first
![Emergency triage](screenshots/03-emergency-triage.jpg)
Your words are checked for red flags before any model runs. Evidence still shows if no model is configured.
## 4. Use your own model (e.g. a medical specialist via Ollama)
![Answer from your endpoint](screenshots/04-your-endpoint-answer.jpg)
```bash
OLLAMA_ORIGINS=https://pythai-draiml.static.hf.space ollama serve
ollama run hf.co/mradermacher/II-Medical-8B-i1-GGUF
```
Then choose **Your endpoint**, URL `http://localhost:11434/v1`, model `hf.co/mradermacher/II-Medical-8B-i1-GGUF`.
Chrome may ask for permission to let the page reach your local network: allow it.
*(The answer in this screenshot came from a test endpoint used to check the interface.)*
## 4a. Physiotherapy & sports therapy mode
![Physiotherapy answer](screenshots/08-physiotherapy-answer.jpg)
Pick **🦴 Physiotherapy** under *Mode*. Retrieval leans on the physiotherapy, rehabilitation and exercise
datasets, and answers follow *What this could be · Exercises & self-care · Red flags — seek care ·
Questions for you*. *(Answer from a test endpoint, used to check the interface.)*
## 4b. Copy or export any answer
![Copy and .txt export](screenshots/09-copy-and-txt-export.jpg)
Every answer has **⧉ Copy** and **⬇ .txt** at its top right. Both include the date, model, question,
answer and the cited sources with their licences.
## 4c. Psychotherapy support mode
![Psychotherapy mode](screenshots/11-psychotherapy-mode.jpg)
**🧠 Psychotherapy** gives CBT-style self-help and support options, with crisis lines first when needed.
Without a model configured you still see the evidence, as here.
## 5. See the evidence behind an answer
![Evidence citations](screenshots/05-evidence-citations.jpg)
Each [n] in the answer is a passage from an openly licensed dataset, shown with its source and licence.
## 6. The Hippocratic review
![Hippocratic review](screenshots/06-hippocratic-review.jpg)
Each answer is scored against do no harm, beneficence, autonomy and confidentiality, with a risk level.
## 7. Search the evidence directly (no sign-in)
![Evidence search](screenshots/07-evidence-search.jpg)
## 8. Browse models
![Hosted engines](screenshots/12-models-hosted-engines.jpg)
**Hosted engines** lists the open models live on HF Inference Providers right now, with licence, context
length, price and providers; select a row to consult it.
![Medical specialists](screenshots/13-models-medical-specialists.jpg)
**Medical specialists** are open medical fine-tunes not hosted anywhere: each has a one-line Ollama command
and a **Use via Ollama** button.
## 9. Browse open health datasets
![Datasets](screenshots/14-datasets-catalogue.jpg)
![Datasets live search](screenshots/10-datasets-live-search.jpg)
Select a dataset row to preview it; **Live Hub search** finds more, with only openly licensed, ungated
results shown.
---
Information only — not a diagnosis. In an emergency call your local emergency number.