Ricardokevins / Bert-In-Relation-Extraction

使用Bert完成实体之间关系抽取
645 stars 73 forks source link

运行main.py的错误 #43

Closed xxxxuanji closed 11 months ago

xxxxuanji commented 11 months ago

执行时提示ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on. 请问要怎么处理

Ricardokevins commented 11 months ago

执行时提示ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on. 请问要怎么处理

你可以提供一下报错的代码位置以及具体的log 我简单的猜测是因为你没有放好下载好的模型文件,导致模型需要在线下载,但是网络又不好没翻墙,就下载不了

xxxxuanji commented 11 months ago

帮我看一下吧 感谢感谢 确实是翻不了墙 然后我下载了模型 但好像还是不能检索到 还需要修改什么吗? QQ图片20231128141339 QQ图片20231128141344

Ricardokevins commented 11 months ago

帮我看一下吧 感谢感谢 确实是翻不了墙 然后我下载了模型 但好像还是不能检索到 还需要修改什么吗? QQ图片20231128141339 QQ图片20231128141344

from pretrain 里面要写具体的路径

xxxxuanji commented 11 months ago
tokenizer = BertTokenizer.from_pretrained("/home/tby/lyc/model/bert_2/Bert-In-Relation-Extraction-main/bert-base-chinese")

我是这样写的

Ricardokevins commented 11 months ago
tokenizer = BertTokenizer.from_pretrained("/home/tby/lyc/model/bert_2/Bert-In-Relation-Extraction-main/bert-base-chinese")

我是这样写的

我都看到你代码了。。。

image
xxxxuanji commented 11 months ago

啊!!下边的没改!感谢大佬!!