Download embedding__model.txt from munibz/rag: direct link, hf CLI and curl.
- Browser
- Download file 403 Bytes
-
https://huggingface.co/spaces/munibz/rag/resolve/main/embedding__model.txt
- Command line
-
hf download hf://spaces/munibz/rag/embedding__model.txt
-
curl -L -o embedding__model.txt https://huggingface.co/spaces/munibz/rag/resolve/main/embedding__model.txt
403 Bytes
| from sentence_transformers import SentenceTransformer | |
| model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2") | |
| sentences = [ | |
| "That is a happy person", | |
| "That is a happy dog", | |
| "That is a very happy person", | |
| "Today is a sunny day" | |
| ] | |
| embeddings = model.encode(sentences) | |
| similarities = model.similarity(embeddings, embeddings) | |
| print(similarities.shape) | |
| # [4, 4] |