Instructions to use r1208/setfit_test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use r1208/setfit_test with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("r1208/setfit_test") 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 r1208/setfit_test with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("r1208/setfit_test") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - Notebooks
- Google Colab
- Kaggle
Download modules.json from r1208/setfit_test: direct link, hf CLI and curl.
- Browser
- Download file 229 Bytes
-
https://huggingface.co/r1208/setfit_test/resolve/main/modules.json
- Command line
-
hf download hf://r1208/setfit_test/modules.json
-
curl -L -o modules.json https://huggingface.co/r1208/setfit_test/resolve/main/modules.json
229 Bytes
| [ | |
| { | |
| "idx": 0, | |
| "name": "0", | |
| "path": "", | |
| "type": "sentence_transformers.models.Transformer" | |
| }, | |
| { | |
| "idx": 1, | |
| "name": "1", | |
| "path": "1_Pooling", | |
| "type": "sentence_transformers.models.Pooling" | |
| } | |
| ] |