Spaces:
No application file
No application file
Download script/embedding.py from yiqing111/AskMyNotes_LLM_RAG: direct link, hf CLI and curl.
- Browser
- Download file 203 Bytes
-
https://huggingface.co/spaces/yiqing111/AskMyNotes_LLM_RAG/resolve/main/script/embedding.py
- Command line
-
hf download hf://spaces/yiqing111/AskMyNotes_LLM_RAG/script/embedding.py
-
curl -L -o embedding.py https://huggingface.co/spaces/yiqing111/AskMyNotes_LLM_RAG/resolve/main/script/embedding.py
203 Bytes
| from sentence_transformers import SentenceTransformer | |
| embedding_model = SentenceTransformer('intfloat/multilingual-e5-large') | |
| def get_embedding(text): | |
| return embedding_model.encode(text).tolist() | |