Download embedding_function.py from GLITCH-08/RAG: direct link, hf CLI and curl.
- Browser
- Download file 247 Bytes
-
https://huggingface.co/spaces/GLITCH-08/RAG/resolve/main/embedding_function.py
- Command line
-
hf download hf://spaces/GLITCH-08/RAG/embedding_function.py
-
curl -L -o embedding_function.py https://huggingface.co/spaces/GLITCH-08/RAG/resolve/main/embedding_function.py
247 Bytes
| from langchain.embeddings import HuggingFaceEmbeddings | |
| def get_embedding(): | |
| # Use a Hugging Face-hosted model that outputs 768-dimensional embeddings | |
| embeddings = HuggingFaceEmbeddings(model_name="bert-base-uncased") | |
| return embeddings |