Downloads · 30 days
18
16% of all-time downloads
YureiYuri/empathy
empathy is a text classification model from YureiYuri. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model classifies mental health-related text into 11 different intent categories.
Downloads · 30 days
18
16% of all-time downloads
All-time downloads
114
Public
Parameters
67M
804 MB on disk
Likes
1
Public
Click a slice to open those files.
.pt536 MB · 50%
From the Hugging Face model README
This model classifies mental health-related text into 11 different intent categories.
The model classifies text into these 11 intents:
depression - Feelings of sadness, hopelessness, worthlessnessanxiety - Worry, panic, nervousnessself_esteem - Issues with self-worth and confidencerelationship - Relationship problems and conflictsfamily - Family-related concernssleep_issues - Insomnia and sleep problemsanger - Anger management issuessuicide - Suicidal thoughts (crisis detection)trauma - PTSD and trauma-related issuesgrief - Loss and bereavementgeneral_support - General emotional support needsfrom transformers import DistilBertTokenizerFast, DistilBertForSequenceClassification
import torch
# Load model and tokenizer
model = DistilBertForSequenceClassification.from_pretrained("YOUR-USERNAME/therapy-chatbot")
tokenizer = DistilBertTokenizerFast.from_pretrained("YOUR-USERNAME/therapy-chatbot")
# Make prediction
text = "I feel worthless and can't sleep at night"
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
with torch.no_grad():
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=1).item()
print(f"Predicted intent: {prediction}")
⚠️ Important: This model is NOT a replacement for professional mental health care. It's designed to assist in categorizing user messages for appropriate responses.
This is an AI model for educational and support purposes only. In case of mental health emergencies, please contact: