Views
No views yet
google/t5-small to simplify behavioral health discharge notes (MIMIC-IV-BHC) into patient-friendly summaries. Part of the Patient-Friendly Summarization of Clinical Discharge Notes project; also explored with a RAG variant for added factual grounding.google/t5-small1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3model_id = "your-username/patient-friendly-mimic-iv-bhc-t5-small"
4tok = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
6
7text = "Paste a BHC discharge note..."
8inputs = tok(text, return_tensors="pt", truncation=True, max_length=512)
9summary_ids = model.generate(**inputs, max_length=128)
10print(tok.decode(summary_ids[0], skip_special_tokens=True))