Oliver Li commited on
Commit
393a4bc
·
1 Parent(s): f809eee

specified interval

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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
- else:
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.")