Commit
·
b5a722d
1
Parent(s):
d0da3f3
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,10 @@ if st.button('Submit'):
|
|
| 18 |
output = classifier(text_input)
|
| 19 |
|
| 20 |
best_prediction = output[0]
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# Display the sentiment prediction to the user
|
| 23 |
-
st.write(f'Sentiment: {
|
| 24 |
-
st.write(f'Confidence: {
|
|
|
|
|
|
| 18 |
output = classifier(text_input)
|
| 19 |
|
| 20 |
best_prediction = output[0]
|
| 21 |
+
sentiment = best_prediction['label']
|
| 22 |
+
confidence = best_prediction['score']
|
| 23 |
|
| 24 |
# Display the sentiment prediction to the user
|
| 25 |
+
st.write(f'Sentiment: {sentiment}')
|
| 26 |
+
st.write(f'Confidence: {confidence}')
|
| 27 |
+
|