code_execution_files / ai-forever_FRIDA_0.txt
ariG23498's picture
ariG23498 HF Staff
Upload ai-forever_FRIDA_0.txt with huggingface_hub
ea4d20d verified
raw
history blame
587 Bytes
```CODE:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("ai-forever/FRIDA")
sentences = [
"The weather is lovely today.",
"It's so sunny outside!",
"He drove to the stadium."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
ERROR:
Traceback (most recent call last):
File "/tmp/ai-forever_FRIDA_0tkhs3H.py", line 14, in <module>
from sentence_transformers import SentenceTransformer
ModuleNotFoundError: No module named 'sentence_transformers'