Downloads · 30 days
2
1% of all-time downloads
rivapereira123/medical-flan-t5
medical-flan-t5 is a machine learning model from rivapereira123. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
🔬 A fine-tuned language model for accurate first-aid advice and emergency medical guidance.
Downloads · 30 days
2
1% of all-time downloads
All-time downloads
232
Public
Repo size
2 GB
Likes
0
Public
Click a slice to open those files.
.bin990 MB · 100%
From the Hugging Face model README
🔬 A fine-tuned language model for accurate first-aid advice and emergency medical guidance.
✅ Appropriate uses:
❌ Not for:
from transformers import pipeline
med_qa = pipeline(
"text2text-generation",
model="your_username/medical-flan-t5",
device=0 if torch.cuda.is_available() else -1
)
question = "FIRST AID QUESTION: What's the treatment for heat stroke?"
answer = med_qa(question)[0]['generated_text']
print(answer)
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("your_username/medical-flan-t5")
model = AutoModelForSeq2SeqLM.from_pretrained("your_username/medical-flan-t5")
inputs = tokenizer(
"MEDICAL QUESTION: How to help someone choking?",
return_tensors="pt",
max_length=512,
truncation=True
)
outputs = model.generate(**inputs)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
Hyperparameters
Parameter Value
Epochs 3
Batch Size 8
Learning Rate 3e-5
Warmup Steps 100
Max Seq Length 512
Evaluation Metrics
Metric Score
BLEU-4 0.82
ROUGE-L 0.76
Medical Accuracy 91.2%
⚠️ Critical Notice: This model provides general first-aid information only. In emergencies:
If you use this model in research:
@misc{medical_flant5_2023,
author = Riva Pereira,
title = {Medical First-Aid Response Model},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/rivapereira123/medical-flan-t5}}
}
For responsible use inquiries: 📧 [email protected]