Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
cdd9137
1
Parent(s):
04accf8
Remove redundant codes in fixing the HF space permission error.
Browse files
app.py
CHANGED
@@ -19,7 +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 |
-
os.makedirs(hf_cache_path, exist_ok=True)
|
23 |
|
24 |
import transformers
|
25 |
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(os.path.join(hf_cache_path, "modules"), exist_ok=True)
|
23 |
|
24 |
import transformers
|
25 |
transformers.utils.move_cache()
|