1from sentence_transformers import SentenceTransformer
23# Download from the 🤗 Hub4model = SentenceTransformer("sentence_transformers_model_id")5# Run inference6sentences =[7'A woman in purple riding a brown horse, competitively.',8"and uh they they have designated smoking but it's just wide open it's not ventilated properly and i think that's bad but as far as the drugs you know being in the factory kind of environment that way",9'The oldest dances are survivors from Moorish times, and are usually performed in mountain villages.',10]11embeddings = model.encode(sentences)12print(embeddings.shape)13# [3, 1024]1415# Get the similarity scores for the embeddings16similarities = model.similarity(embeddings, embeddings)17print(similarities)18# tensor([[ 1.0000, -0.0255, 0.1637],19# [-0.0255, 1.0000, 0.0579],20# [ 0.1637, 0.0579, 1.0000]])