I am trying to use the huggingface transformers library in a hosted Jupyter notebook platform called Deepnote. I want to download a model through the pipeline class but unfortunately deepnote does not support IPyWidgets. Is there a way to disable IPywidgets when using transformers? Specifically the below command.
classifier = pipeline("zero-shot-classification")
And the error I receive.
ImportError: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
Note: Installing IPyWidgets is not an option
You have to disable transformers logging. Even though it is possible to use transformers.logging.set_verbosity to change the log level, it's not possible to set it to
logging.NOTSET
which is required to skip usingIProgress
andtqdm
. So we need to hack it like this:After that you should be able to use:
Check out my Deepnote project for details ;)