Downloads · 30 days
20
28% of all-time downloads
monajm36/ohca-classifier-v9
ohca-classifier-v9 is a text classification model from monajm36. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This model classifies clinical notes to identify Out-of-Hospital Cardiac Arrest (OHCA) cases. It's based on BiomedNLP-PubMedBERT and trained on MIMIC-III data.
Downloads · 30 days
20
28% of all-time downloads
All-time downloads
72
Public
Repo size
438 MB
Likes
0
Public
Click a slice to open those files.
.bin438 MB · 100%
From the Hugging Face model README
This model classifies clinical notes to identify Out-of-Hospital Cardiac Arrest (OHCA) cases. It's based on BiomedNLP-PubMedBERT and trained on MIMIC-III data.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model
tokenizer = AutoTokenizer.from_pretrained("monajm36/ohca-classifier-v9")
model = AutoModelForSequenceClassification.from_pretrained("monajm36/ohca-classifier-v9")
# Predict
def predict_ohca(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)
return probs[0][1].item() # OHCA probability
# Example
text = "Chief Complaint: Cardiac arrest. HPI: Patient found unresponsive..."
prob = predict_ohca(text)
print(f"OHCA Probability: {prob:.3f}")
This model is for research purposes only. Not intended for clinical decision-making.