Document CLIP model source in embedder.py and README
Model downloads automatically from HuggingFace Hub on first use. No manual download required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,9 @@ _model = None
|
||||
def _get_model():
|
||||
# Lazy load: the CLIP model is ~600 MB and takes several seconds to initialise.
|
||||
# Loading on first call avoids the cost at import time and during indexing warmup.
|
||||
# Downloaded automatically from Hugging Face Hub on first use:
|
||||
# https://huggingface.co/sentence-transformers/clip-ViT-B-32
|
||||
# Cached in ~/.cache/huggingface/hub/
|
||||
global _model
|
||||
if _model is None:
|
||||
_model = SentenceTransformer("clip-ViT-B-32")
|
||||
|
||||
Reference in New Issue
Block a user