bash
pip install transformers[flax]
To check 🤗 Transformers is properly installed, run the following command:
bash
python -c "from transformers import pipeline; print(pipeline('sentiment-analysis')('we love you'))"
It should download a pretrained model then print something like
bash
[{'label': 'POSITIVE', 'score': 0.9998704791069031}]
(Note that TensorFlow will print additional stuff before that last statement.)
Installing from source
Here is how to quickly install transformers from source:
bash
pip install git+https://github.com/huggingface/transformers
Note that this will install not the latest released version, but the bleeding edge master version, which you may want to use in case a bug has been fixed since the last official release and a new release hasn't been yet rolled out.
While we strive to keep master operational at all times, if you notice some issues, they usually get fixed within a few hours or a day and you're more than welcome to help us detect any problems by opening an Issue and this way, things will get fixed even sooner.
