Instructions to use KBLab/emotional-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use KBLab/emotional-classification with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("KBLab/emotional-classification") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - setfit
How to use KBLab/emotional-classification with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("KBLab/emotional-classification") - Notebooks
- Google Colab
- Kaggle
include warnings
Browse files
README.md
CHANGED
|
@@ -16,10 +16,12 @@ This is a [SetFit model](https://github.com/huggingface/setfit) that can be used
|
|
| 16 |
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
| 17 |
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
| 18 |
|
| 19 |
-
Accuracy on a number of experiments can be found in the figure below.
|
| 20 |
|
| 21 |

|
| 22 |
|
|
|
|
|
|
|
| 23 |
Id to emotional label schema is as follows:
|
| 24 |
|
| 25 |
```
|
|
|
|
| 16 |
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
| 17 |
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
| 18 |
|
| 19 |
+
Accuracy on a number of experiments on a minimal test set (35 examples) can be found in the figure below.
|
| 20 |
|
| 21 |

|
| 22 |
|
| 23 |
+
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 cherry picked. This model will be properly evaluated on real life data at a later time.
|
| 24 |
+
|
| 25 |
Id to emotional label schema is as follows:
|
| 26 |
|
| 27 |
```
|