Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
04accf8
1
Parent(s):
27b44f0
Remove redundant codes in fixing the HF space permission error.
Browse files
app.py
CHANGED
|
@@ -19,6 +19,7 @@ import zipfile
|
|
| 19 |
# Fix the HF space permission error when using from_pretrained(..., trust_remote_code=True)
|
| 20 |
hf_cache_path = '/tmp/hf_cache'
|
| 21 |
os.environ["HF_HOME"] = hf_cache_path
|
|
|
|
| 22 |
|
| 23 |
import transformers
|
| 24 |
transformers.utils.move_cache()
|
|
|
|
| 19 |
# Fix the HF space permission error when using from_pretrained(..., trust_remote_code=True)
|
| 20 |
hf_cache_path = '/tmp/hf_cache'
|
| 21 |
os.environ["HF_HOME"] = hf_cache_path
|
| 22 |
+
os.makedirs(hf_cache_path, exist_ok=True)
|
| 23 |
|
| 24 |
import transformers
|
| 25 |
transformers.utils.move_cache()
|