Instructions to use a607ernie/setfit-mental-1_minus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use a607ernie/setfit-mental-1_minus with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("a607ernie/setfit-mental-1_minus") 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 a607ernie/setfit-mental-1_minus with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("a607ernie/setfit-mental-1_minus") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - Notebooks
- Google Colab
- Kaggle
File size: 134 Bytes
f50c5ba | 1 2 3 4 | version https://git-lfs.github.com/spec/v1
oid sha256:fb386c3ffe690c9a34a07b6fa218a4e689d34ddabaef8cef9a515d63d0e62a9c
size 438012073
|