from sentence_transformers import SentenceTransformer | |
model = SentenceTransformer('symanto/sn-xlm-roberta-base-snli-mnli-anli-xnli') | |
def getvec(text: str): | |
sentences = [text,] | |
embeddings = model.encode(sentences) | |
return embeddings[0] |
from sentence_transformers import SentenceTransformer | |
model = SentenceTransformer('symanto/sn-xlm-roberta-base-snli-mnli-anli-xnli') | |
def getvec(text: str): | |
sentences = [text,] | |
embeddings = model.encode(sentences) | |
return embeddings[0] |