Make transformers install check positive (#7473)

When transformers is correctly installed, you should get a positive message ^_^
This commit is contained in:
François REMY
2020-09-30 13:44:40 +02:00
committed by GitHub
parent 7a0cf0ec93
commit cc4eff8087

View File

@@ -37,13 +37,13 @@ pip install transformers[tf-cpu]
To check 🤗 Transformers is properly installed, run the following command: To check 🤗 Transformers is properly installed, run the following command:
```bash ```bash
python -c "from transformers import pipeline; print(pipeline('sentiment-analysis')('I hate you'))" python -c "from transformers import pipeline; print(pipeline('sentiment-analysis')('we love you'))"
``` ```
It should download a pretrained model then print something like It should download a pretrained model then print something like
```bash ```bash
[{'label': 'NEGATIVE', 'score': 0.9991129040718079}] [{'label': 'POSITIVE', 'score': 0.9998704791069031}]
``` ```
(Note that TensorFlow will print additional stuff before that last statement.) (Note that TensorFlow will print additional stuff before that last statement.)