Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -48,10 +48,11 @@ def get_prediction(model_id):
|
|
48 |
def predict(review):
|
49 |
prediction = classifier(review)
|
50 |
print(prediction)
|
51 |
-
stars = prediction[0]['label']
|
52 |
-
stars = (int)(stars.split('_')[1])+1
|
53 |
-
score = 100*prediction[0]['score']
|
54 |
-
return "{} {:.0f}%".format("\U00002B50"*stars, score)
|
|
|
55 |
return predict
|
56 |
|
57 |
with app:
|
|
|
48 |
def predict(review):
|
49 |
prediction = classifier(review)
|
50 |
print(prediction)
|
51 |
+
# stars = prediction[0]['label']
|
52 |
+
# stars = (int)(stars.split('_')[1])+1
|
53 |
+
# score = 100*prediction[0]['score']
|
54 |
+
# return "{} {:.0f}%".format("\U00002B50"*stars, score)
|
55 |
+
return prediction
|
56 |
return predict
|
57 |
|
58 |
with app:
|