Rifky commited on
Commit
c95dd80
1 Parent(s): 88f5a17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -80,8 +80,6 @@ if submit:
80
 
81
  prediction = np.argmax(result, axis=-1)
82
  if prediction == 0:
83
- st.success(f"This news is {label[prediction]}.")
84
- else:
85
  st.markdown(f"""<p style="background-color: rgb(254, 242, 242);
86
  color: rgb(153, 27, 27);
87
  font-size: 20px;
@@ -91,6 +89,16 @@ if submit:
91
  padding-bottom: 15px;
92
  line-height: 25px;
93
  text-align: center;">This article is <b>{label[prediction]}</b>.</p>""", unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
94
 
95
  with st.expander("Related Articles"):
96
  for i in sorted[:5]:
80
 
81
  prediction = np.argmax(result, axis=-1)
82
  if prediction == 0:
 
 
83
  st.markdown(f"""<p style="background-color: rgb(254, 242, 242);
84
  color: rgb(153, 27, 27);
85
  font-size: 20px;
89
  padding-bottom: 15px;
90
  line-height: 25px;
91
  text-align: center;">This article is <b>{label[prediction]}</b>.</p>""", unsafe_allow_html=True)
92
+ else:
93
+ st.markdown(f"""<p style="background-color: rgb(236, 253, 245);
94
+ color: rgb(6, 95, 70);
95
+ font-size: 20px;
96
+ border-radius: 7px;
97
+ padding-left: 12px;
98
+ padding-top: 15px;
99
+ padding-bottom: 15px;
100
+ line-height: 25px;
101
+ text-align: center;">This article is <b>{label[prediction]}</b>.</p>""", unsafe_allow_html=True)
102
 
103
  with st.expander("Related Articles"):
104
  for i in sorted[:5]: