π§ BioBERT-Medical-Specialities
BioBERT-Medical-Specialities is a fine-tuned BioBERT model for multi-class medical text classification.
It classifies short medical questions or symptom descriptions into one of 35 clinical specialities.
π Labels
This model predicts the following 35 medical specialties:
None, Cardiology, Hematology, Oncology, Endocrinology, Respiratory, Allergy, Dermatology, Nephrology, Gastroenterology, Rheumatology, Otorhinolaryngology, Anesthesiology, Biochemistry, Pharmacology, Psychiatry, Microbiology, Physiology, Pathology, Obstetrics, Gynecology, Surgery, Emergency, Orthopedics, Neurology, Urology, Anatomy, Genetics, Radiology, Ophthalmology, Odontology, Pediatrics, Geriatrics, Nursing, Chemistry, Psychology
π¦ Model Details
- Base model:
dmis-lab/biobert-base-cased-v1.1
- Fine-tuned on:
HPAI-BSC/medical-specialities
- Task: Multi-class medical text classification
- Languages: English π¬π§
- License: Apache 2.0
π How to Use
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
model_name = "your-username/biobert-medical-specialities"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Example input
text = "I have constant chest pain and shortness of breath."
# Tokenize and predict
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
with torch.no_grad():
logits = model(**inputs).logits
predicted_class_id = logits.argmax().item()
predicted_label = model.config.id2label[predicted_class_id]
print(f"Predicted medical speciality: {predicted_label}")
- Downloads last month
- 61
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support
Model tree for OzzeY72/biobert-medical-specialities
Base model
dmis-lab/biobert-base-cased-v1.1