Created
August 11, 2022 19:06
-
-
Save Spartee/46ee2247f5b965d60b5ddafb6418a194 to your computer and use it in GitHub Desktop.
Example of using sentence_transformers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sentence_transformers import SentenceTransformer | |
model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2') | |
sentences = [ | |
"That is a very happy Person", | |
"That is a Happy Dog", | |
"Today is a sunny day" | |
] | |
embeddings = model.encode(sentences) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment