This is a
SetFit model
that can be used for classification of emotions in Swedish text. The model supports seven basic emotions, listed below. The model has been trained using an efficient few-shot learning technique that involves:
Training a classification head with features from the finetuned Sentence Transformer.
Accuracy on a number of experiments on a minimal test set (35 examples) can be found in the figure below.
Please note that these results are not a good representation of the model's actual performance. As previously stated, the test set is tiny and the examples in that test set are chosen to be good examples of the categories at hand. This is not the case with real life data. The model will be properly evaluated on real data at a later time.
The model has been trained on news headlines that have been manually annotated at KBLab by the PhD student Nora Hansson Bittár.
Usage
To use this model for inference, first install the SetFit library:
python -m pip install setfit
You can then run inference as follows:
from setfit import SetFitModel
# Download from Hub and run inference
model = SetFitModel.from_pretrained("KBLab/emotional-classification")
# Run inference
preds = model(["Ingen tech-dystopi slår människans inre mörker", "Ina Lundström: Jag har två Bruce-tatueringar"])
This outputs predictions sadness/disappointment and absence of emotion. Keep in mind that these examples are cherrypicked as most headlines (which is what the model is trained on) are rarely as clear.
BibTeX entry and citation info
@article{https://doi.org/10.48550/arxiv.2209.11055,
doi = {10.48550/ARXIV.2209.11055},
url = {https://arxiv.org/abs/2209.11055},
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {Efficient Few-Shot Learning Without Prompts},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
Runs of KBLab emotional-classification on huggingface.co
1.7K
Total runs
0
24-hour runs
0
3-day runs
7
7-day runs
164
30-day runs
More Information About emotional-classification huggingface.co Model
emotional-classification huggingface.co is an AI model on huggingface.co that provides emotional-classification's model effect (), which can be used instantly with this KBLab emotional-classification model. huggingface.co supports a free trial of the emotional-classification model, and also provides paid use of the emotional-classification. Support call emotional-classification model through api, including Node.js, Python, http.
emotional-classification huggingface.co is an online trial and call api platform, which integrates emotional-classification's modeling effects, including api services, and provides a free online trial of emotional-classification, you can try emotional-classification online for free by clicking the link below.
KBLab emotional-classification online free url in huggingface.co:
emotional-classification is an open source model from GitHub that offers a free installation service, and any user can find emotional-classification on GitHub to install. At the same time, huggingface.co provides the effect of emotional-classification install, users can directly use emotional-classification installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
emotional-classification install url in huggingface.co: