File size: 278 Bytes
6917098 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from typing import List
import torch
from sentence_transformers import SentenceTransformer
class Embedding:
model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
@classmethod
def encode_text(cls, text: str):
return cls.model.encode(text)
|