Instructions to use mrin/SetFit_on_Disaster_tweets with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use mrin/SetFit_on_Disaster_tweets with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mrin/SetFit_on_Disaster_tweets") 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 mrin/SetFit_on_Disaster_tweets with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mrin/SetFit_on_Disaster_tweets") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - Notebooks
- Google Colab
- Kaggle
Add SetFit model
Browse files- model_head.pkl +1 -1
- pytorch_model.bin +1 -1
- tokenizer.json +3 -1
model_head.pkl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7663
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06856cf16bdeb36b3e4bea57310e9cf66bf2b5ab028439b132c297e10d86cf46
|
| 3 |
size 7663
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 438012073
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa0a2257a43596240f2edc3b16df50429c118df1facb83814bcdda1b1a193e19
|
| 3 |
size 438012073
|
tokenizer.json
CHANGED
|
@@ -7,7 +7,9 @@
|
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
"padding": {
|
| 10 |
-
"strategy":
|
|
|
|
|
|
|
| 11 |
"direction": "Right",
|
| 12 |
"pad_to_multiple_of": null,
|
| 13 |
"pad_id": 1,
|
|
|
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
"padding": {
|
| 10 |
+
"strategy": {
|
| 11 |
+
"Fixed": 512
|
| 12 |
+
},
|
| 13 |
"direction": "Right",
|
| 14 |
"pad_to_multiple_of": null,
|
| 15 |
"pad_id": 1,
|