Getting a 404 error when loading 'model=facebook/bart-large-mnli' from pipeline('zero-shot-classification')
Author: Sneg42
Pull request: no

Getting a 404 when trying to load the model.
model='joeddav/bart-large-mnli-yahoo-answers' also not working. 

`404 Client Error: Not Found for url: https://huggingface.co/facebook/bart-large-mnli/resolve/main/tf_model.h5
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
~/.local/lib/python3.8/site-packages/transformers/modeling_tf_utils.py in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
    695                 # Load from URL or cache if already cached
--> 696                 resolved_archive_file = cached_path(
    697                     archive_file,

~/.local/lib/python3.8/site-packages/transformers/file_utils.py in cached_path(url_or_filename, cache_dir, force_download, proxies, resume_download, user_agent, extract_compressed_file, force_extract, local_files_only)
    999         # URL, so get it from the cache (downloading if necessary)
-> 1000         output_path = get_from_cache(
   1001             url_or_filename,

~/.local/lib/python3.8/site-packages/transformers/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only)
   1127             r = requests.head(url, headers=headers, allow_redirects=False, proxies=proxies, timeout=etag_timeout)
-> 1128             r.raise_for_status()
   1129             etag = r.headers.get("X-Linked-Etag") or r.headers.get("ETag")

/usr/lib/python3/dist-packages/requests/models.py in raise_for_status(self)
    939         if http_error_msg:
--> 940             raise HTTPError(http_error_msg, response=self)
    941 

HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/facebook/bart-large-mnli/resolve/main/tf_model.h5

During handling of the above exception, another exception occurred:

OSError                                   Traceback (most recent call last)
<ipython-input-48-a42b4974064c> in <module>
----> 1 classifier = pipeline('zero-shot-classification',
      2                       model='facebook/bart-large-mnli',
      3 #                      model='joeddav/bart-large-mnli-yahoo-answers',
      4 #                       model = 'bert-base-uncased'
      5 #                       model ='phiyodr/bart-large-finetuned-squad2',

~/.local/lib/python3.8/site-packages/transformers/pipelines.py in pipeline(task, model, config, tokenizer, framework, revision, use_fast, **kwargs)
   2934         model = get_default_model(targeted_task, framework, task_options)
   2935 
-> 2936     framework = framework or get_framework(model)
   2937 
   2938     task_class, model_class = targeted_task["impl"], targeted_task[framework]

~/.local/lib/python3.8/site-packages/transformers/pipelines.py in get_framework(model, revision)
    106             model = AutoModel.from_pretrained(model, revision=revision)
    107         elif is_tf_available() and not is_torch_available():
--> 108             model = TFAutoModel.from_pretrained(model, revision=revision)
    109         else:
    110             try:

~/.local/lib/python3.8/site-packages/transformers/models/auto/modeling_tf_auto.py in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
    558 
    559         if type(config) in TF_MODEL_MAPPING.keys():
--> 560             return TF_MODEL_MAPPING[type(config)].from_pretrained(
    561                 pretrained_model_name_or_path, *model_args, config=config, **kwargs
    562             )

~/.local/lib/python3.8/site-packages/transformers/modeling_tf_utils.py in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
    709                     f"- or '{pretrained_model_name_or_path}' is the correct path to a directory containing a file named one of {TF2_WEIGHTS_NAME}, {WEIGHTS_NAME}.\n\n"
    710                 )
--> 711                 raise EnvironmentError(msg)
    712             if resolved_archive_file == archive_file:
    713                 logger.info("loading weights file {}".format(archive_file))

OSError: Can't load weights for 'facebook/bart-large-mnli'. Make sure that:

- 'facebook/bart-large-mnli' is a correct model identifier listed on 'https://huggingface.co/models'

- or 'facebook/bart-large-mnli' is the correct path to a directory containing a file named one of tf_model.h5, pytorch_model.bin.`


Comments:
After the full restart PC, works fine.