LinkLinkWu commited on
Commit
a9d6d3f
·
verified ·
1 Parent(s): b0b8a17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -93,9 +93,9 @@ if st.button("🔍 Get News and Sentiment"):
93
  neg_ratio = neg_count / total if total else 0
94
 
95
  # Simple heuristic for overall sentiment
96
- if pos_ratio >= 0.25:
97
  overall = "Positive"
98
- elif neg_ratio >= 0.75:
99
  overall = "Negative"
100
  else:
101
  overall = "Neutral"
 
93
  neg_ratio = neg_count / total if total else 0
94
 
95
  # Simple heuristic for overall sentiment
96
+ if pos_ratio >= 0.5:
97
  overall = "Positive"
98
+ elif neg_ratio >= 0.5:
99
  overall = "Negative"
100
  else:
101
  overall = "Neutral"