title: AutoModelForSequenceClassification requires the PyTorch library but it was not found in your environment
body: <p>I am trying to use the roberta transformer and a pre-trained model but I keep getting this error:</p>
  <pre><code>    ImportError: 
  AutoModelForSequenceClassification requires the PyTorch library but it was not found in your environment. Checkout the instructions on the
  installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment.
  </code></pre>
  <p>Here's my code:</p>
  <pre><code># Tasks:
  # emoji, emotion, hate, irony, offensive, sentiment
  # stance/abortion, stance/atheism, stance/climate, stance/feminist, stance/hillary
  
  task='sentiment'
  MODEL = f&quot;cardiffnlp/twitter-roberta-base-{task}&quot;
  
  tokenizer = AutoTokenizer.from_pretrained(MODEL)
  # download label mapping
  labels=[]
  mapping_link = f&quot;https://raw.githubusercontent.com/cardiffnlp/tweeteval/main/datasets/{task}/mapping.txt&quot;
  model = AutoModelForSequenceClassification.from_pretrained(MODEL)
  model.save_pretrained(MODEL)
  labels=[]
  mapping_link = f&quot;https://raw.githubusercontent.com/cardiffnlp/tweeteval/main/datasets/{task}/mapping.txt&quot;
  with urllib.request.urlopen(mapping_link) as f:
      html = f.read().decode('utf-8').split(&quot;\n&quot;)
      csvreader = csv.reader(html, delimiter='\t')
  labels = [row[1] for row in csvreader if len(row) &gt; 1]
  </code></pre>
  <p>I made sure that PyTorch is installed and working:</p>
  <p><a href="https://i.stack.imgur.com/yLhj0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yLhj0.png" alt="enter image description here" /></a></p>