How to use pavanmantha/embeddinggemma-pubmed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("pavanmantha/embeddinggemma-pubmed") sentences = [ "Are stroke patients' reports of home blood pressure readings reliable?", "The first Whitehall study.", "A total of 1027 monitor and 716 booklet readings were recorded. Ninety per cent of booklet recordings were exactly the same as the BP monitor readings. Average booklet readings were 0.6 mmHg systolic [95% confidence interval (95% CI) -0.6 to 1.8] and 0.3 mmHg diastolic (95% CI -0.3 to 0.8) lower than those on the monitor.", "Protocol 1: a) office blood pressure measurement and Home1 were significantly higher than ambulatory blood pressure monitoring, except for systolic and diastolic office blood pressure measurement taken by the patient or a family member, systolic blood pressure taken by a nurse, and diastolic blood pressure taken by a physician. b) ambulatory blood pressure monitoring and HBPM1 were similar. Protocol 2: a) HBPM2 and Home2 were similar. b) Home2 was significantly lower than Home1, except for diastolic blood pressure taken by a nurse or the patient. There were significant relationships between: a) diastolic blood pressure measured by the patient and the thickness of the interventricular septum, posterior wall, and left ventricular mass; and b) ambulatory and HBPM2 diastolic and systolic blood pressure taken by a physician (home2) and left ventricular mass. Therefore, the data indicate that home blood pressure measurement and ambulatory blood pressure monitoring had good prognostic values relative to \"office measurement.\"" ] 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!