Spaces:
Sleeping
Sleeping
Update retriever.py
Browse files- retriever.py +3 -8
retriever.py
CHANGED
|
@@ -10,11 +10,6 @@ import json
|
|
| 10 |
HF_TOKEN_read = os.environ.get("HF_TOKEN_read")
|
| 11 |
#HF_TOKEN_inference = os.environ.get("HF_TOKEN_inf")
|
| 12 |
|
| 13 |
-
# Make sure cache is redirected to /tmp - for dataset and model
|
| 14 |
-
os.environ["HF_HOME"] = "/tmp/hf_cache"
|
| 15 |
-
os.environ["TRANSFORMERS_CACHE"] = "/tmp/hf_cache"
|
| 16 |
-
os.environ["HF_HUB_CACHE"] = "/tmp/hf_cache"
|
| 17 |
-
|
| 18 |
# Dataset repo (private)
|
| 19 |
DATASET_REPO = "luciagomez/MrPhil_vector"
|
| 20 |
|
|
@@ -26,7 +21,7 @@ parquet_path = hf_hub_download(
|
|
| 26 |
filename="foundations.parquet",
|
| 27 |
repo_type="dataset",
|
| 28 |
token=HF_TOKEN_read,
|
| 29 |
-
cache_dir="/tmp/
|
| 30 |
)
|
| 31 |
|
| 32 |
faiss_path = hf_hub_download(
|
|
@@ -34,7 +29,7 @@ faiss_path = hf_hub_download(
|
|
| 34 |
filename="faiss.index",
|
| 35 |
repo_type="dataset",
|
| 36 |
token=HF_TOKEN_read,
|
| 37 |
-
cache_dir="/tmp/
|
| 38 |
)
|
| 39 |
|
| 40 |
meta_path = hf_hub_download(
|
|
@@ -42,7 +37,7 @@ meta_path = hf_hub_download(
|
|
| 42 |
filename="meta.json",
|
| 43 |
repo_type="dataset",
|
| 44 |
token=HF_TOKEN_read,
|
| 45 |
-
cache_dir="/tmp/
|
| 46 |
)
|
| 47 |
|
| 48 |
|
|
|
|
| 10 |
HF_TOKEN_read = os.environ.get("HF_TOKEN_read")
|
| 11 |
#HF_TOKEN_inference = os.environ.get("HF_TOKEN_inf")
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# Dataset repo (private)
|
| 14 |
DATASET_REPO = "luciagomez/MrPhil_vector"
|
| 15 |
|
|
|
|
| 21 |
filename="foundations.parquet",
|
| 22 |
repo_type="dataset",
|
| 23 |
token=HF_TOKEN_read,
|
| 24 |
+
cache_dir="/tmp/huggingface"
|
| 25 |
)
|
| 26 |
|
| 27 |
faiss_path = hf_hub_download(
|
|
|
|
| 29 |
filename="faiss.index",
|
| 30 |
repo_type="dataset",
|
| 31 |
token=HF_TOKEN_read,
|
| 32 |
+
cache_dir="/tmp/huggingface"
|
| 33 |
)
|
| 34 |
|
| 35 |
meta_path = hf_hub_download(
|
|
|
|
| 37 |
filename="meta.json",
|
| 38 |
repo_type="dataset",
|
| 39 |
token=HF_TOKEN_read,
|
| 40 |
+
cache_dir="/tmp/huggingface"
|
| 41 |
)
|
| 42 |
|
| 43 |
|