Text Classification
setfit
Safetensors
sentence-transformers
multilingual
xlm-roberta
text-embeddings-inference
Instructions to use automatedMotiveCoder/setfit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use automatedMotiveCoder/setfit with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("automatedMotiveCoder/setfit") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use automatedMotiveCoder/setfit with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("automatedMotiveCoder/setfit") 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] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -64,6 +64,12 @@ model = SetFitModel.from_pretrained("automatedMotiveCoder/setfit")
|
|
| 64 |
preds = model("I loved the spiderman movie!")
|
| 65 |
```
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
<!--
|
| 68 |
### Downstream Use
|
| 69 |
|
|
|
|
| 64 |
preds = model("I loved the spiderman movie!")
|
| 65 |
```
|
| 66 |
|
| 67 |
+
When using the `predict_proba()` method, the predicted probabilities for
|
| 68 |
+
all classes might not sum to 1. This is because the model loaded uses a
|
| 69 |
+
One-vs-Rest classification approach, which means the model treats each
|
| 70 |
+
class as a binary classification problem. As a result, the probabilities
|
| 71 |
+
are independent, and their sum may exceed or fall below 1.
|
| 72 |
+
|
| 73 |
<!--
|
| 74 |
### Downstream Use
|
| 75 |
|