Spaces:
Build error
Build error
Download get_embedding_function.py from ThaparInstituteOfTechnology/ThaparGPT: direct link, hf CLI and curl.
- Browser
- Download file 378 Bytes
-
https://huggingface.co/spaces/ThaparInstituteOfTechnology/ThaparGPT/resolve/main/get_embedding_function.py
- Command line
-
hf download hf://spaces/ThaparInstituteOfTechnology/ThaparGPT/get_embedding_function.py
-
curl -L -o get_embedding_function.py https://huggingface.co/spaces/ThaparInstituteOfTechnology/ThaparGPT/resolve/main/get_embedding_function.py
378 Bytes
| from langchain_community.embeddings.ollama import OllamaEmbeddings | |
| from langchain_community.embeddings.bedrock import BedrockEmbeddings | |
| # | |
| def get_embedding_function(): | |
| # embeddings = BedrockEmbeddings( | |
| # credentials_profile_name="default", region_name="us-east-1" | |
| # ) | |
| embeddings = OllamaEmbeddings(model="nomic-embed-text") | |
| return embeddings | |