Julien Simon commited on
Commit
e930d0c
·
1 Parent(s): e440ffc

Update output message

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ classifier = pipeline("text-classification", model="juliensimon/distilbert-amazo
5
 
6
  def predict(review):
7
  prediction = classifier(review)
8
- stars = prediction['label'].split('_')[1]
9
  score = prediction['score']
10
  return "{} {:.0f}%".format("\U00002B50"*stars, score)
11
 
 
5
 
6
  def predict(review):
7
  prediction = classifier(review)
8
+ stars = (int)(prediction['label'].split('_')[1])
9
  score = prediction['score']
10
  return "{} {:.0f}%".format("\U00002B50"*stars, score)
11