Update utils/vector_search.py
Browse files- utils/vector_search.py +3 -1
utils/vector_search.py
CHANGED
|
@@ -15,7 +15,9 @@ qdrant_client = QdrantClient(
|
|
| 15 |
)
|
| 16 |
|
| 17 |
# Initialize SentenceTransformer model
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
# Collection name (must match the one used during upsert)
|
| 21 |
collection_name = "symptoms"
|
|
|
|
| 15 |
)
|
| 16 |
|
| 17 |
# Initialize SentenceTransformer model
|
| 18 |
+
cache_dir = os.environ.get("MODEL_CACHE_DIR", "/app/cache") # Fallback to /app/cache
|
| 19 |
+
os.makedirs(cache_dir, exist_ok=True)
|
| 20 |
+
model = SentenceTransformer("all-MiniLM-L6-v2", cache_folder=cache_dir)
|
| 21 |
|
| 22 |
# Collection name (must match the one used during upsert)
|
| 23 |
collection_name = "symptoms"
|