Spaces:
Sleeping
Sleeping
from sentence_transformers import SentenceTransformer | |
model = SentenceTransformer('moka-ai/m3e-base') | |
# model = SentenceTransformer('nghuyong/ernie-3.0-base-zh') | |
def encode(text: str): | |
text = text.replace("\n", " ") | |
return model.encode([text], normalize_embeddings=True).tolist()[0] | |