CoolFace
Apppublic

vidulpanickan/steam-clinical-assertion-demo

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
App README

⚡ STEAM Clinical Assertion

Type or paste a clinical note, type your terms of interest, and click Check — the STEAM BERT model labels each occurrence on five assertion axes (negated, certainty, realis, experiencer, temporality) and rolls them up to an i2b2 assertion label.

Two steps:

  1. 1.Find the terms — word-anchored matching (~O(n)); clinical-aware tokens so 1.5, p.o., mg/dl, and covid-19 stay intact.
  2. 2.Classify — a BERT encoder with five assertion heads (run as an int8 ONNX model via onnxruntime — no PyTorch, CPU-friendly).
  • Model: vidulpanickan/steam-clinical-assertion-5axis (the Space loads model.int8.onnx).
  • Sample notes are synthetic (no PHI).

Files

FileRole
app.pyThe Gradio app: match terms, classify with the ONNX model, highlight + table.
requirements.txtgradio, onnxruntime, tokenizers, numpy, huggingface_hub.

Run locally

bash
pip install -r requirements.txt
python app.py

The model (model.int8.onnx + tokenizer) is downloaded from the Hub on first run and cached. Set MODEL_ID to point at a different model repo, or STEAM_ONNX=model.onnx to use the full-precision graph instead of int8.