The model is part of the Nivra AI Healthcare Assistant project, designed to help Indian patients understand and classify their symptoms accurately.
This is a fine-tuned version of ClinicalBERT specifically trained for symptom classification in the Indian healthcare context. The model is part of the Nivra AI Healthcare Assistant project, designed to help Indian patients understand and classify their symptoms accurately.
Developed by: datdevsteve
Model Type: Text Classification
Language: English (Medical Terminology)
Base Model: medicalai/ClinicalBERT
License: MIT
Limitations
Known Biases
Socioeconomic: Terminology reflects middle-class Indian healthcare context
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
model_name = "your-username/clinicalbert-indian-symptoms"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Prepare input
text = "I have fever, headache and body pain for 2 days"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
# Get prediction
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
probs = torch.softmax(logits, dim=-1)
predicted_class = torch.argmax(probs, dim=-1).item()
# Get label
label = model.config.id2label[predicted_class]
confidence = probs[predicted_class].item()
print(f"Condition: {label}")
print(f"Confidence: {confidence:.2%}")
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="your-username/clinicalbert-indian-symptoms",
top_k=5
)
result = classifier("I have persistent cough and chest congestion")
print(result)
The Training Data is based off a compilation of 3 Kaggle Datasets:
Preprocessing:
Training Hyperparameters:
{
"learning_rate": 2e-5,
"batch_size": 16,
"num_epochs": 5,
"warmup_steps": 500,
"weight_decay": 0.01,
"optimizer": "AdamW",
"lr_scheduler": "linear",
"max_seq_length": 512
}
Training Time: ~3 hours GPU: NVIDIA T4 (16GB) Framework: PyTorch 2.1.0, Transformers 4.36.0
Using test dataset made in compiled dataset splits
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
model.safetensors 544 MBtraining_args.bin 5.8 kBmedicalai/ClinicalBERT