Spaces:
Sleeping
Sleeping
donadelicc
commited on
Commit
•
7b31d6c
1
Parent(s):
0397641
upd
Browse files
app.py
CHANGED
@@ -19,13 +19,13 @@ def predict(text):
|
|
19 |
confidence= f"{confidence_score:.2%}"
|
20 |
|
21 |
if str(prediction[0]) == "1":
|
22 |
-
label = "
|
23 |
elif str(prediction[0]) == "2":
|
24 |
-
label = "
|
25 |
else:
|
26 |
label = "dunno"
|
27 |
|
28 |
-
output = f"Prediction: {label}
|
29 |
|
30 |
print(prediction)
|
31 |
return output, confidence
|
|
|
19 |
confidence= f"{confidence_score:.2%}"
|
20 |
|
21 |
if str(prediction[0]) == "1":
|
22 |
+
label = "NEGATIVE"
|
23 |
elif str(prediction[0]) == "2":
|
24 |
+
label = "POSITIVE"
|
25 |
else:
|
26 |
label = "dunno"
|
27 |
|
28 |
+
output = f"Prediction: {label} \n Confidence: {confidence}"
|
29 |
|
30 |
print(prediction)
|
31 |
return output, confidence
|