How to use kitrakrev/smart-router-embeddings with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("kitrakrev/smart-router-embeddings") sentences = [ "[\"\\\"In China land can not be owned, but only leased for 70 years.\\\"?\"]", "[\"HI, how do i make hot chocolate like done in Moscow?\"]", "[\"Do you know and are you able to handle the data format *.twig?\"]", "[\"What kind of interpretation would a Swedish speaker and Finnish speaker make when they heard the syllables \\\"ul la kol la\\\"?\",\"Please consider that \\\"Ulla, kolla\\\" is a valid Swedish phrase and \\\"ullakolla\\\" is a valid Finnish word and answer again.\",\"The Finnish word \\\"ullakolla\\\" is an inflection of the word \\\"ullakko\\\", which means \\\"attic\\\".\"]" ] 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!