Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#关于BertTokenizer.from_pretrained()函数的一些问题 #29

Open
ashen1jqk opened this issue May 22, 2022 · 0 comments
Open

#关于BertTokenizer.from_pretrained()函数的一些问题 #29

ashen1jqk opened this issue May 22, 2022 · 0 comments

Comments

@ashen1jqk
Copy link

大佬,请问一下,在文件的实例化tokenizer和model下面的函数
image
这个图里面问题怎么解决
/usr/local/lib/python3.6/dist-packages/transformers/tokenization_utils_base.py:1656: FutureWarning: Calling BertTokenizer.from_pretrained() with the path to a single file or url is deprecated and won't be possible anymore in v5. Use a model identifier or the path to a directory instead.
FutureWarning,
load model ending!
我在本地运行python http_server.py是没有出现这个问题的,我根据提示将tokenizer = BertTokenizer.from_pretrained(args.vocab_path, do_lower_case=True)改为
tokenizer = BertTokenizer.from_pretrained('vocab/vocab.txt') do_lower_case=True 结果还是一样的结果 改为tokenizer = BertTokenizer.from_pretrained('vocab/vocab.txt')也不正确 改为tokenizer = BertTokenizer.from_pretrained('/cx/GPT2-NewsTitle-main/vocab/vocab.txt')`结果都是一样的,运行代码没有出现网页,求教

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant