iioSnail commited on
Commit
d3a1af5
·
verified ·
1 Parent(s): 1096e2a
Files changed (1) hide show
  1. csc_tokenizer.py +1 -3
csc_tokenizer.py CHANGED
@@ -9,7 +9,6 @@ import tokenizers
9
  import torch
10
  from torch import NoneType
11
  from huggingface_hub import hf_hub_download
12
- from huggingface_hub.file_download import http_user_agent
13
  from pypinyin import pinyin, Style
14
  from transformers.tokenization_utils_base import TruncationStrategy
15
  from transformers.utils import PaddingStrategy
@@ -36,8 +35,7 @@ def download_file(filename: str, path: Path):
36
  hf_hub_download(
37
  "iioSnail/ChineseBERT-for-csc",
38
  filename,
39
- local_dir=cache_path,
40
- user_agent=http_user_agent(),
41
  )
42
  time.sleep(0.2)
43
 
 
9
  import torch
10
  from torch import NoneType
11
  from huggingface_hub import hf_hub_download
 
12
  from pypinyin import pinyin, Style
13
  from transformers.tokenization_utils_base import TruncationStrategy
14
  from transformers.utils import PaddingStrategy
 
35
  hf_hub_download(
36
  "iioSnail/ChineseBERT-for-csc",
37
  filename,
38
+ local_dir=cache_path
 
39
  )
40
  time.sleep(0.2)
41