johnnas12 commited on
Commit
e743a6a
·
verified ·
1 Parent(s): 47144d9

fix: the presentation of sentiment

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +6 -2
src/streamlit_app.py CHANGED
@@ -23,7 +23,11 @@ if st.button("Analyze Sentiment"):
23
  label = result[0]['label']
24
  score = result[0]['score']
25
 
26
- st.write(f"Sentiment: {label}")
27
- st.write(f"Confidence Score: {score:.4f}")
 
 
 
 
28
  else:
29
  st.write("Please enter some text to analyze.")
 
23
  label = result[0]['label']
24
  score = result[0]['score']
25
 
26
+ if label == 'LABEL_1':
27
+ st.write(f"Sentiment: Its Positive tweet")
28
+ st.write(f"Confidence Score: {score:.4f}")
29
+ else:
30
+ st.write(f"Sentiment: Its Negative tweet")
31
+ st.write(f"Confidence Score: {score:.4f}")
32
  else:
33
  st.write("Please enter some text to analyze.")