ZidanePMSE commited on
Commit
a5c8e91
·
verified ·
1 Parent(s): 2d4f05f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ model = AutoModelForSequenceClassification.from_pretrained(MODEL_ID)
14
  model.to(DEVICE)
15
  model.eval()
16
 
17
- LABELS = ["negative", "positive"]
18
 
19
  # ==============================
20
  # 2. Inference Function
@@ -37,7 +37,7 @@ def classify_sentiment(text):
37
  pos_p = softmax[1]
38
 
39
  # Predict label
40
- label = "negative" if neg_p > pos_p else "positive"
41
 
42
  return {
43
  "label": label,
 
14
  model.to(DEVICE)
15
  model.eval()
16
 
17
+ LABELS = ["neg", "pos"]
18
 
19
  # ==============================
20
  # 2. Inference Function
 
37
  pos_p = softmax[1]
38
 
39
  # Predict label
40
+ label = "neg" if neg_p > pos_p else "pos"
41
 
42
  return {
43
  "label": label,