【发布时间】:2020-06-05 02:11:20
【问题描述】:
此示例取自拥抱脸,但会产生模型加载错误。我以为我下载了这个模型,但是否知道我可以如何避免这个错误?谢谢,威尔
from ktrain import text
zsl = text.ZeroShotClassifier()
topic_strings=['politics', 'elections', 'sports', 'films', 'television']
doc = 'I am extremely dissatisfied with the President and will definitely vote in 2020.'
zsl.predict(doc, topic_strings=topic_strings, include_labels=True)
结果:
OSError:在标记器模型名称列表(bart-large、bart-large-mnli、bart-large-cnn、bart-large-xsum)中找不到模型名称“facebook/bart-large-mnli”。我们假设 'facebook/bart-large-mnli' 是路径、模型标识符或指向包含名为 ['vocab.json', 'merges.txt'] 的词汇文件的目录的 url,但在以下位置找不到此类词汇文件此路径或网址。
【问题讨论】:
标签: deep-learning nlp