File size: 339 Bytes
ff3f7f1
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from sentence_transformers import SentenceTransformer
import pandas as pd

sentences = ["This is an example sentence", "Each sentence is converted"]

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

embeddings_df = pd.DataFrame(embeddings)

embeddings_df.to_csv("embeddings.csv")