Open NingYueran opened 1 year ago
I'm sorry, I can't type Chinese on my school workstation.
Can you instead run the following (it is a part of download.py
)?
from transformers import AutoConfig, AutoTokenizer, AutoModelForTokenClassification
model_name = "bert-base-uncased"
config = AutoConfig.from_pretrained(model_name, num_labels=3)
model = AutoModelForTokenClassification.from_pretrained(model_name, config=config)
tokenizer = AutoTokenizer.from_pretrained(model_name)
Teacher, thank you very much for your answer. Now download.py can run normally.
But there is a new problem, Can you provide me with the function create json file?
Traceback (most recent call last):
File "tl_agg.py", line 289, in
您好,想问一下,我在运行python download.py的时候出现如下错误: raceback (most recent call last): File "download.py", line 2, in
import pathlib
ValueError: source code string cannot contain null bytes
该如何解决?谢谢您
修改了好几次都不对,还是报这个错误。