sentence-transformers How to use PietroSaveri/meme-cluster-classifier with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("PietroSaveri/meme-cluster-classifier")
sentences = [
"Mitochondria, often called 'powerhouses of the cell,' generate most of the cell's ATP through cellular respiration and have their own DNA.",
"Plate tectonics theory explains that Earth's lithosphere is divided into plates that move, causing earthquakes, volcanoes, and mountain formation.",
"The Titanic was intentionally sunk as part of an insurance scam by J.P. Morgan.",
"Why can't you trust a statistician? They're always plotting something, and they have a mean personality."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]