How to use imageomics/trait2vec with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("imageomics/trait2vec") sentences = [ "Ventral humeral ridge: or not", "If metasternum ossified, shape: long, narrow and tapering markedly anteriorly to posteriorly, length up to 3.5 times maximum width", "Astragalus, dorsolateral margin:: overlaps the anterior and posterior portions of the calcaneum equally", "Ulna size: does not apply" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4]
The community tab is the place to discuss and collaborate with the HF community!