Download retrieval/__init__.py from Necthrall/AI: direct link, hf CLI and curl.
- Browser
- Download file 704 Bytes
-
https://huggingface.co/spaces/Necthrall/AI/resolve/main/retrieval/__init__.py
- Command line
-
hf download hf://spaces/Necthrall/AI/retrieval/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/Necthrall/AI/resolve/main/retrieval/__init__.py
704 Bytes
| """Retrieval module for hybrid search with LlamaIndex. | |
| This module provides: | |
| - LlamaIndexRetriever: Hybrid search combining FAISS + BM25 with RRF fusion | |
| - CrossEncoderReranker: Re-ranking with cross-encoder for improved relevance | |
| """ | |
| from retrieval.llamaindex_retriever import LlamaIndexRetriever | |
| # Lazy import for CrossEncoderReranker to avoid torch DLL issues on Windows | |
| # Import it directly when needed: from retrieval.reranker import CrossEncoderReranker | |
| def get_reranker(): | |
| """Lazy loader for CrossEncoderReranker to avoid Windows DLL conflicts.""" | |
| from retrieval.reranker import CrossEncoderReranker | |
| return CrossEncoderReranker | |
| __all__ = ["LlamaIndexRetriever", "get_reranker"] | |