CoolFace
Modelpublic

coding-zzz-oe/empathy-strategy-classifier

sourceHugging Facemitupdated 11d agoView on Hugging Face
0likes19downloads
Model Card

Emotional Support Strategy Classifier

This model is a fine-tuned RoBERTa-base model for classifying emotional support conversation strategies.

Model Description

  • Base Model: roberta-base
  • Task: Multi-class text classification
  • Training Data: ESConv (Emotional Support Conversation) dataset
  • Number of Labels: 8

Labels

The model classifies text into 8 emotional support strategies:

  1. 1.Affirmation and Reassurance
  2. 2.Information
  3. 3.Others
  4. 4.Providing Suggestions
  5. 5.Question
  6. 6.Reflection of feelings
  7. 7.Restatement or Paraphrasing
  8. 8.Self-disclosure

Usage

python
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]}")

Training

Fine-tuned on the ESConv dataset using the Hugging Face Transformers library.

Citation

If you use this model, please cite the ESConv dataset:

bibtex
@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}
}