dahongj commited on
Commit
af81e70
1 Parent(s): 36fd211
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
5
  import torch
6
 
7
  def bertweet(data):
8
- specific_model = pipeline(model="finiteautomata/bertweet-base-sentiment-analysis")
9
  result = specific_model(data)
10
  label = result[0]['label']
11
  score = result[0]['score']
 
5
  import torch
6
 
7
  def bertweet(data):
8
+ specific_model = AutoModelForSequenceClassification.from_pretrained(model="finiteautomata/bertweet-base-sentiment-analysis")
9
  result = specific_model(data)
10
  label = result[0]['label']
11
  score = result[0]['score']