How to use fpc/bge-micro-smiles with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("fpc/bge-micro-smiles") sentences = [ "donepezil hydrochloride monohydrate", "Cn1nccc1[C@H]1CC[C@H](O[Si](C)(C)C(C)(C)C)C[C@@H]1OC(=O)c1ccccc1", "COc1cc2c(cc1OC)C(=O)C(CC1CCN(Cc3ccccc3)CC1)C2.Cl.O", "C(=O)(OC)C1=CC=C(C=C1)CC(C)=O" ] 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!