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
removed reference to gilleti
Browse files
README.md
CHANGED
|
@@ -51,7 +51,7 @@ You can then run inference as follows:
|
|
| 51 |
from setfit import SetFitModel
|
| 52 |
|
| 53 |
# Download from Hub and run inference
|
| 54 |
-
model = SetFitModel.from_pretrained("
|
| 55 |
# Run inference
|
| 56 |
preds = model(["Ingen tech-dystopi slår människans inre mörker", "Ina Lundström: Jag har två Bruce-tatueringar"])
|
| 57 |
```
|
|
|
|
| 51 |
from setfit import SetFitModel
|
| 52 |
|
| 53 |
# Download from Hub and run inference
|
| 54 |
+
model = SetFitModel.from_pretrained("KBLab/emotional-classification")
|
| 55 |
# Run inference
|
| 56 |
preds = model(["Ingen tech-dystopi slår människans inre mörker", "Ina Lundström: Jag har två Bruce-tatueringar"])
|
| 57 |
```
|