Update app.py
Browse files
app.py
CHANGED
@@ -78,12 +78,26 @@ if submit:
|
|
78 |
).flatten()
|
79 |
sorted = np.argsort(similarity_score)[::-1].tolist()
|
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.error(f"This news is {label[prediction]}.")
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
with st.expander("Related Articles"):
|
88 |
for i in sorted[:5]:
|
89 |
# st.write(f"""""",unsafe_allow_html=True)
|
|
|
78 |
).flatten()
|
79 |
sorted = np.argsort(similarity_score)[::-1].tolist()
|
80 |
|
81 |
+
m = st.markdown("""
|
82 |
+
<style>
|
83 |
+
* {
|
84 |
+
text-align: center;
|
85 |
+
}
|
86 |
+
</style>""", unsafe_allow_html=True)
|
87 |
+
|
88 |
prediction = np.argmax(result, axis=-1)
|
89 |
if prediction == 0:
|
90 |
st.success(f"This news is {label[prediction]}.")
|
91 |
else:
|
92 |
st.error(f"This news is {label[prediction]}.")
|
93 |
|
94 |
+
m = st.markdown("""
|
95 |
+
<style>
|
96 |
+
* {
|
97 |
+
text-align: left;
|
98 |
+
}
|
99 |
+
</style>""", unsafe_allow_html=True)
|
100 |
+
|
101 |
with st.expander("Related Articles"):
|
102 |
for i in sorted[:5]:
|
103 |
# st.write(f"""""",unsafe_allow_html=True)
|