I’m going through the first steps of the course. The example code works fine on Google Colab but not on my laptop. I installed transformers andits dependencies in an anaconda environment. When I run the following code:
from transformers import pipeline
classifier = pipeline(“sentiment-analysis”)classifier(“I’ve been waiting for a HuggingFace course my whole life.”)
The output is:
(ai) mike@M-MacBook-Pro transformers % python test2.py
No model was supplied, defaulted to distilbert/distilbert-base-uncased-finetuned-sst-2-english and revision 714eb0f ().
Using a pipeline without specifying a model name and revision in production is not recommended.
Device set to use cpu
(ai) mike@M-MacBook-Pro transformers %
but when I run the same code on Colab, I get a classification. Any ideas on what the problem is?