Downloads · 30 days
10
0% of all-time downloads
adicadi/medipal-mental-health
medipal-mental-health is a text classification model from adicadi. Use it when you need a label for a piece of text. The card lists the license as mit.
This is a fine-tuned RoBERTa-Large model for mental health sentiment classification. It classifies text into 7 categories:
Downloads · 30 days
10
0% of all-time downloads
All-time downloads
14.2K
Public
Parameters
355M
1.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.4 GB · 100%
From the Hugging Face model README
This is a fine-tuned RoBERTa-Large model for mental health sentiment classification. It classifies text into 7 categories:
This model is designed for mental health journal analysis and should be used as a supportive tool, not as a replacement for professional mental health diagnosis.
from transformers import RobertaTokenizer, RobertaForSequenceClassification import torch
model = RobertaForSequenceClassification.from_pretrained("adicadi/medipal-mental-health") tokenizer = RobertaTokenizer.from_pretrained("adicadi/medipal-mental-health")
text = "I feel anxious and worried" inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=128)
with torch.no_grad(): outputs = model(**inputs) predictions = torch.nn.functional.softmax(outputs.logits, dim=-1) predicted_class = torch.argmax(predictions).item()
labels = ['Anxiety', 'Bipolar', 'Depression', 'Normal', 'Personality disorder', 'Stress', 'Suicidal'] print(f"Predicted: {labels[predicted_class]}") print(f"Confidence: {predictions[predicted_class].item():.2f}")
curl https://api-inference.huggingface.co/models/adicadi/medipal-mental-health -H "Authorization: Bearer YOUR_HF_TOKEN" -H "Content-Type: application/json" -d '{"inputs": "I feel anxious and worried"}'
This model deals with sensitive mental health data. Users should:
For questions or issues, please contact the model author.