code_execution_files / Qwen_Qwen3-Embedding-0.6B_0.txt
ariG23498's picture
ariG23498 HF Staff
Upload Qwen_Qwen3-Embedding-0.6B_0.txt with huggingface_hub
b4dfb39 verified
raw
history blame
605 Bytes
```CODE:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("Qwen/Qwen3-Embedding-0.6B")
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/Qwen_Qwen3-Embedding-0.6B_02swo0t.py", line 14, in <module>
from sentence_transformers import SentenceTransformer
ModuleNotFoundError: No module named 'sentence_transformers'