ZhengPeng7 commited on
Commit
cdd9137
·
1 Parent(s): 04accf8

Remove redundant codes in fixing the HF space permission error.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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()