Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Creating the query vector using sentence transformers
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
# create the vector embedding for the query
query_embedding = model.encode("That is a happy person")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment