Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,9 @@ def get_prediction(model_id):
|
|
22 |
def predict(review):
|
23 |
prediction = classifier(review)
|
24 |
#print(prediction)
|
25 |
-
|
|
|
|
|
26 |
return predict
|
27 |
|
28 |
with app:
|
|
|
22 |
def predict(review):
|
23 |
prediction = classifier(review)
|
24 |
#print(prediction)
|
25 |
+
label = prediction[:]['label']
|
26 |
+
score = 100*prediction[:]['score']
|
27 |
+
return (label, score)
|
28 |
return predict
|
29 |
|
30 |
with app:
|