CoolFace
Modelpublic

coding-zzz-oe/empathy-strategy-classifier

sourceHugging Facemitupdated 14d agoView on Hugging Face
0likes20downloads
README.md74 linesDownload Raw Back to root
1---2language: en3tags:4- text-classification5- emotional-support6- empathy7- mental-health8license: mit9datasets:10- esconv11library_name: transformers12---13 14# Emotional Support Strategy Classifier15 16This model is a fine-tuned RoBERTa-base model for classifying emotional support conversation strategies.17 18## Model Description19 20- **Base Model**: roberta-base21- **Task**: Multi-class text classification22- **Training Data**: ESConv (Emotional Support Conversation) dataset23- **Number of Labels**: 824 25## Labels26 27The model classifies text into 8 emotional support strategies:28 290. Affirmation and Reassurance301. Information312. Others323. Providing Suggestions334. Question345. Reflection of feelings356. Restatement or Paraphrasing367. Self-disclosure37 38## Usage39 40```python41from transformers import AutoTokenizer, AutoModelForSequenceClassification42import torch43 44# Load model and tokenizer45model_name = "RyanDDD/empathy-strategy-classifier"46tokenizer = AutoTokenizer.from_pretrained(model_name)47model = AutoModelForSequenceClassification.from_pretrained(model_name)48 49# Example prediction50text = "I understand how you feel. It's completely normal to feel this way."51inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)52outputs = model(**inputs)53predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)54predicted_class = torch.argmax(predictions, dim=-1).item()55 56print(f"Predicted strategy: {model.config.id2label[predicted_class]}")57```58 59## Training60 61Fine-tuned on the ESConv dataset using the Hugging Face Transformers library.62 63## Citation64 65If you use this model, please cite the ESConv dataset:66 67```bibtex68@inproceedings{liu2021towards,69  title={Towards Emotional Support Dialog Systems},70  author={Liu, Siyang and Zheng, Chujie and Demasi, Orianna and Sabour, Sahand and Li, Yu and Yu, Zhou and Jiang, Yong and Huang, Minlie},71  booktitle={Proceedings of ACL},72  year={2021}73}74```