Hi after running this code below, I get the following error.
ValueError: Could not load model facebook/bart-large-mnli with any of the following classes: (<class 'transformers.models.auto.modeling_tf_auto.TFAutoModelForSequenceClassification'>,).
import tensorflow as tf
from transformers import pipeline
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
Could someone please help. Thank you!
I had the same issue! Somebody has commented here that you need to have PyTorch installed (https://github.com/huggingface/transformers/issues/16849).
To sum it up:
deepset/roberta-base-squad2).pipeline() selects the framework (TF or PyTorch) based on what is installed on your machine (or venv in my case)from_pt=True and save as personal copy as a TF model with save_pretrained and push_to_hubIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With