Oluwaferanmi
commited on
Commit
·
e75ba0c
1
Parent(s):
dac20be
Re-upload valid PDFs with Git LFS
Browse files- orchestrator.py +7 -4
orchestrator.py
CHANGED
|
@@ -41,10 +41,13 @@ VECTOR_STORE_DIR = os.getenv('VECTOR_STORE_DIR', '/tmp/vector_store')
|
|
| 41 |
# Allow disabling RAG entirely for resource-constrained environments
|
| 42 |
DISABLE_RAG = os.getenv('DISABLE_RAG', 'false').lower() in ('true', '1', 'yes')
|
| 43 |
|
| 44 |
-
|
| 45 |
-
os
|
| 46 |
-
os.environ
|
| 47 |
-
os.environ
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
# Pre-download embedding model to cache
|
| 50 |
def _ensure_embedding_model_cached(model_name: str) -> bool:
|
|
|
|
| 41 |
# Allow disabling RAG entirely for resource-constrained environments
|
| 42 |
DISABLE_RAG = os.getenv('DISABLE_RAG', 'false').lower() in ('true', '1', 'yes')
|
| 43 |
|
| 44 |
+
|
| 45 |
+
import os
|
| 46 |
+
os.environ["TRANSFORMERS_CACHE"] = "/tmp/huggingface_cache"
|
| 47 |
+
os.environ["SENTENCE_TRANSFORMERS_HOME"] = "/tmp/huggingface_cache"
|
| 48 |
+
os.environ["HF_HOME"] = "/tmp/huggingface_cache"
|
| 49 |
+
os.makedirs("/tmp/huggingface_cache", exist_ok=True)
|
| 50 |
+
|
| 51 |
|
| 52 |
# Pre-download embedding model to cache
|
| 53 |
def _ensure_embedding_model_cached(model_name: str) -> bool:
|