not able load model from pipeline NotFound error
Author: tiru1930
Pull request: no

I am trying to load textattack ylep model in pipeline but it was saying below error

```
/home/tiru/anaconda3/envs/td-solutions/bin/python /snap/pycharm-community/236/plugins/python-ce/helpers/pydev/pydevconsole.py --mode=client --port=40643
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['/home/tiru/Desktop/td-solutions', '/home/tiru/Desktop/td-solutions/td-inference-only/text_sentiment_classification/transformers_bert'])
PyDev console: starting.
Python 3.8.8 (default, Feb 24 2021, 21:46:12) 
[GCC 7.3.0] on linux

from transformers import pipeline
2021-04-29 12:00:40.847050: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-04-29 12:00:40.847070: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
model = pipeline('sentiment-analysis', model='textattack/bert-base-uncased-yelp-polarity',revision="6722736")
404 Client Error: Not Found for url: https://huggingface.co/textattack/bert-base-uncased-yelp-polarity/resolve/main/tf_model.h5
Traceback (most recent call last):
  File "/home/tiru/anaconda3/envs/td-solutions/lib/python3.8/site-packages/transformers/modeling_tf_utils.py", line 1191, in from_pretrained
    resolved_archive_file = cached_path(
  File "/home/tiru/anaconda3/envs/td-solutions/lib/python3.8/site-packages/transformers/file_utils.py", line 1036, in cached_path
    output_path = get_from_cache(
  File "/home/tiru/anaconda3/envs/td-solutions/lib/python3.8/site-packages/transformers/file_utils.py", line 1174, in get_from_cache
    r.raise_for_status()
  File "/home/tiru/anaconda3/envs/td-solutions/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/textattack/bert-base-uncased-yelp-polarity/resolve/main/tf_model.h5
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/tiru/anaconda3/envs/td-solutions/lib/python3.8/site-packages/transformers/pipelines/__init__.py", line 340, in pipeline
    framework = framework or get_framework(model)
  File "/home/tiru/anaconda3/envs/td-solutions/lib/python3.8/site-packages/transformers/pipelines/base.py", line 68, in get_framework
    model = TFAutoModel.from_pretrained(model, revision=revision)
  File "/home/tiru/anaconda3/envs/td-solutions/lib/python3.8/site-packages/transformers/models/auto/modeling_tf_auto.py", line 602, in from_pretrained
    return TF_MODEL_MAPPING[type(config)].from_pretrained(
  File "/home/tiru/anaconda3/envs/td-solutions/lib/python3.8/site-packages/transformers/modeling_tf_utils.py", line 1207, in from_pretrained
    raise EnvironmentError(msg)
OSError: Can't load weights for 'textattack/bert-base-uncased-yelp-polarity'. Make sure that:
- 'textattack/bert-base-uncased-yelp-polarity' is a correct model identifier listed on 'https://huggingface.co/models'
- or 'textattack/bert-base-uncased-yelp-polarity' is the correct path to a directory containing a file named one of tf_model.h5, pytorch_model.bin.

```

Comments:
Could you try with the full revision, i.e., `672273686ecedd6fbbd5c0593b17df082ab65e31`?

same issues @LysandreJik  

```
model = pipeline('sentiment-analysis', model='textattack/bert-base-uncased-yelp-polarity',revision="672273686ecedd6fbbd5c0593b17df082ab65e31")


404 Client Error: Not Found for url: https://huggingface.co/textattack/bert-base-uncased-yelp-polarity/resolve/main/tf_model.h5
Traceback (most recent call last):
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/modeling_tf_utils.py", line 702, in from_pretrained
    local_files_only=local_files_only,
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/file_utils.py", line 1007, in cached_path
    local_files_only=local_files_only,
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/file_utils.py", line 1128, in get_from_cache
    r.raise_for_status()
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/textattack/bert-base-uncased-yelp-polarity/resolve/main/tf_model.h5

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/pipelines.py", line 2936, in pipeline
    framework = framework or get_framework(model)
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/pipelines.py", line 108, in get_framework
    model = TFAutoModel.from_pretrained(model, revision=revision)
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/models/auto/modeling_tf_auto.py", line 561, in from_pretrained
    pretrained_model_name_or_path, *model_args, config=config, **kwargs
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/modeling_tf_utils.py", line 711, in from_pretrained
    raise EnvironmentError(msg)
OSError: Can't load weights for 'textattack/bert-base-uncased-yelp-polarity'. Make sure that:

- 'textattack/bert-base-uncased-yelp-polarity' is a correct model identifier listed on 'https://huggingface.co/models'

- or 'textattack/bert-base-uncased-yelp-polarity' is the correct path to a directory containing a file named one of tf_model.h5, pytorch_model.bin.

```
```
>>> model = pipeline('sentiment-analysis', model='textattack/bert-base-uncased-yelp-polarity')


404 Client Error: Not Found for url: https://huggingface.co/textattack/bert-base-uncased-yelp-polarity/resolve/main/tf_model.h5
Traceback (most recent call last):
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/modeling_tf_utils.py", line 702, in from_pretrained
    local_files_only=local_files_only,
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/file_utils.py", line 1007, in cached_path
    local_files_only=local_files_only,
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/file_utils.py", line 1128, in get_from_cache
    r.raise_for_status()
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/textattack/bert-base-uncased-yelp-polarity/resolve/main/tf_model.h5

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/pipelines.py", line 2936, in pipeline
    framework = framework or get_framework(model)
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/pipelines.py", line 108, in get_framework
    model = TFAutoModel.from_pretrained(model, revision=revision)
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/models/auto/modeling_tf_auto.py", line 561, in from_pretrained
    pretrained_model_name_or_path, *model_args, config=config, **kwargs
  File "/home/tiru/anaconda3/lib/python3.7/site-packages/transformers/modeling_tf_utils.py", line 711, in from_pretrained
    raise EnvironmentError(msg)
OSError: Can't load weights for 'textattack/bert-base-uncased-yelp-polarity'. Make sure that:

- 'textattack/bert-base-uncased-yelp-polarity' is a correct model identifier listed on 'https://huggingface.co/models'

- or 'textattack/bert-base-uncased-yelp-polarity' is the correct path to a directory containing a file named one of tf_model.h5, pytorch_model.bin.

````

Ah, I think the error message could be clearer here; what I understand from this error is that you don't have PyTorch installed in your environment - only TensorFlow; however, that model does not have a TensorFlow checkpoint uploaded to the hub by `textattack`, only a PyTorch variant, so it fails at loading it.

Could you install torch in your environment so as to benefit from the torch model? `pip install torch`

Running your code should work fine after this.

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.