Spaces:
Runtime error
Runtime error
File size: 326 Bytes
841b0ff |
1 2 3 4 5 6 7 8 9 |
from langchain_community.embeddings.sentence_transformer import (
SentenceTransformerEmbeddings
)
model = SentenceTransformerEmbeddings(model_name="vinai/phobert-base-v2")
query = 'This framework generates embeddings for each input sentence'
sentence_embeddings = model.embed_query(query)
print(len(sentence_embeddings)) |