python 01-sentiment.py
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
No model was supplied, defaulted to distilbert-base-uncased-finetuned-sst-2-english and revision af0f99b (https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english).
Using a pipeline without specifying a model name and revision in production is not recommended.
Downloading (…)lve/main/config.json: 100%|█████| 629/629 [00:00<00:00, 5.29MB/s]
Traceback (most recent call last):
[...]
infer_framework_load_model
raise RuntimeError(
RuntimeError: At least one of TensorFlow 2.0 or PyTorch should be installed. To install TensorFlow 2.0, read the instructions at https://www.tensorflow.org/install/ To install PyTorch, read the instructions at https://pytorch.org/.
following this tuto https://huggingface.co/learn/nlp-course/fr/chapter1/3?fw=pt with this config https://huggingface.co/learn/nlp-course/fr/chapter0/1?fw=pt#utilisation-dun-environnement-virtuel-python it appear that torch is not installed
Should'nt you add "pip install torch" somewhere ?