fix: Dockerfile + multi-path e5-base model lookup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,13 @@ import numpy as np
|
||||
|
||||
INDEX_DIR = Path(__file__).parent / "index"
|
||||
# Local model: multilingual-e5-base (free, 768 dim, 5/5 accuracy)
|
||||
E5_MODEL_PATH = str(Path.home() / ".cache/huggingface/hub/models--intfloat--multilingual-e5-base/snapshots/main")
|
||||
# Try multiple locations
|
||||
_E5_PATHS = [
|
||||
Path.home() / ".cache/huggingface/hub/models--intfloat--multilingual-e5-base/snapshots/main",
|
||||
Path.home() / "e5-base-model",
|
||||
Path("/app/e5-base-model"),
|
||||
]
|
||||
E5_MODEL_PATH = str(next((p for p in _E5_PATHS if p.exists()), _E5_PATHS[0]))
|
||||
EMBEDDING_DIM = 768
|
||||
|
||||
_model_cache = None
|
||||
|
||||
Reference in New Issue
Block a user