Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
217b29d
1
Parent(s):
a0f35d6
Change the CACHE PATH of HF and transformers lib.
Browse files
app.py
CHANGED
|
@@ -19,6 +19,12 @@ import zipfile
|
|
| 19 |
|
| 20 |
|
| 21 |
transformers.utils.move_cache()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
torch.set_float32_matmul_precision('high')
|
| 23 |
torch.jit.script = lambda f: f
|
| 24 |
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
transformers.utils.move_cache()
|
| 22 |
+
os.environ["HUGGINGFACE_HUB_CACHE"] = "/data/hf_cache"
|
| 23 |
+
os.environ["HF_HOME"] = "/data/hf_cache"
|
| 24 |
+
os.environ["TRANSFORMERS_CACHE"] = "/data/hf_cache"
|
| 25 |
+
os.makedirs("/data/hf_cache", exist_ok=True)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
torch.set_float32_matmul_precision('high')
|
| 29 |
torch.jit.script = lambda f: f
|
| 30 |
|