Downloads · 30 days
48
15% of all-time downloads
RyanDDD/empathy-strategy-classifier
empathy-strategy-classifier is a text classification model from RyanDDD. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned RoBERTa-base model for classifying emotional support conversation strategies.
Downloads · 30 days
48
15% of all-time downloads
All-time downloads
310
Public
Parameters
125M
997 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors499 MB · 100%
From the Hugging Face model README
This model is a fine-tuned RoBERTa-base model for classifying emotional support conversation strategies.
The model classifies text into 8 emotional support strategies:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
model_name = "RyanDDD/empathy-strategy-classifier"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Example prediction
text = "I understand how you feel. It's completely normal to feel this way."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
predicted_class = torch.argmax(predictions, dim=-1).item()
print(f"Predicted strategy: {model.config.id2label[predicted_class]}")
Fine-tuned on the ESConv dataset using the Hugging Face Transformers library.
If you use this model, please cite the ESConv dataset:
@inproceedings{liu2021towards,
title={Towards Emotional Support Dialog Systems},
author={Liu, Siyang and Zheng, Chujie and Demasi, Orianna and Sabour, Sahand and Li, Yu and Yu, Zhou and Jiang, Yong and Huang, Minlie},
booktitle={Proceedings of ACL},
year={2021}
}