File size: 290 Bytes
30c4c6d
 
 
3e14644
 
 
 
 
 
1
2
3
4
5
6
7
8
9
!pip install sentence-transformers


from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]

model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
embeddings = model.encode(sentences)
print(embeddings)