How to use Stevenf232/context_fine-tuned-SapBERT with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Stevenf232/context_fine-tuned-SapBERT") sentences = [ "anencephaly [SEP] Sequential observations of exencephaly and subsequent morphological changes by mouse exo utero development system: analysis of t", "Hemostatic Disorders [SEP] Pathological processes involving the integrity of blood circulation. Hemostasis depends on the integrity of BLOOD VESSELS, blood", "Pentylenetetrazole [SEP] A pharmaceutical agent that displays activity as a central nervous system and respiratory stimulant. It is considered a non-comp", "Epilepsy [SEP] A disorder characterized by recurrent episodes of paroxysmal brain dysfunction due to a sudden, disorderly, and excessive neuron" ] 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!