Spaces:
Sleeping
Sleeping
| """Embedding functionality for LegisQA""" | |
| from chromadb.utils import embedding_functions | |
| from legisqa_local.config.settings import EMBEDDING_MODEL, EMBEDDING_DEVICE | |
| def load_embeddings(): | |
| """Load and return the embedding function""" | |
| emb_fn = embedding_functions.SentenceTransformerEmbeddingFunction( | |
| model_name=EMBEDDING_MODEL | |
| ) | |
| return emb_fn | |