我试图在一个名为Deepnote的托管Jupyter笔记本平台中使用huggingface transformers库。我想通过pipeline类下载一个模型,但不幸的是deepnote不支持IPyWidget。在使用Transformer时,有没有办法禁用IPyWidget?特别是下面的命令
classifier = pipeline("zero-shot-classification")
还有我收到的错误
ImportError: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
注意:安装IPyWidgets不是一个选项
您必须禁用变压器日志记录。即使可以使用transformers.logging.set_verbosity更改日志级别,也不可能将其设置为
logging.NOTSET
,而is required将跳过使用IProgress
和tqdm
。所以我们需要像这样破解它:之后,您应该能够使用:
查看my Deepnote project了解详细信息;)
相关问题 更多 >
编程相关推荐