Spaces:
Runtime error
Runtime error
Oliver Li
commited on
Commit
·
393a4bc
1
Parent(s):
f809eee
specified interval
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ if st.button("Analyze"):
|
|
36 |
st.write(f"Sentiment: {result[0]['label']} (confidence: {result[0]['score']:.2f})")
|
37 |
if result[0]['label'] == 'POSITIVE':
|
38 |
st.balloons()
|
39 |
-
|
40 |
st.error("Hater detected.")
|
41 |
else:
|
42 |
st.write("Enter a text and click 'Analyze' to perform sentiment analysis.")
|
|
|
36 |
st.write(f"Sentiment: {result[0]['label']} (confidence: {result[0]['score']:.2f})")
|
37 |
if result[0]['label'] == 'POSITIVE':
|
38 |
st.balloons()
|
39 |
+
elif result[0]['label']== 'NEGATIVE' and result[0]['score']> 0.9:
|
40 |
st.error("Hater detected.")
|
41 |
else:
|
42 |
st.write("Enter a text and click 'Analyze' to perform sentiment analysis.")
|