Spaces:
Runtime error
Runtime error
Update sentiment-analyser.py
Browse files- sentiment-analyser.py +4 -4
sentiment-analyser.py
CHANGED
@@ -18,7 +18,7 @@ if submit:
|
|
18 |
result = classifier(user_input)[0]
|
19 |
label = result['label']
|
20 |
score = result['score']
|
21 |
-
if label == 'POSITIVE':
|
22 |
-
|
23 |
-
else:
|
24 |
-
|
|
|
18 |
result = classifier(user_input)[0]
|
19 |
label = result['label']
|
20 |
score = result['score']
|
21 |
+
if label == 'POSITIVE':
|
22 |
+
st.success(f'{label} sentiment (score: {score})')
|
23 |
+
else:
|
24 |
+
st.error(f'{label} sentiment (score: {score})')
|