Update app.py
Browse files
app.py
CHANGED
@@ -29,15 +29,26 @@ def load_model():
|
|
29 |
def sigmoid(x):
|
30 |
return 1 / (1 + np.exp(-x))
|
31 |
|
32 |
-
st.markdown("""<h2 style="text-align:center;">Fake News Detection AI</h2>""", unsafe_allow_html=True)
|
33 |
-
|
34 |
with st.spinner("Loading Model..."):
|
35 |
model, base_model, tokenizer, data = load_model()
|
36 |
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
if submit:
|
|
|
41 |
last_time = time.time()
|
42 |
with st.spinner("Reading Article..."):
|
43 |
scrap = Scrap(user_input)
|
|
|
29 |
def sigmoid(x):
|
30 |
return 1 / (1 + np.exp(-x))
|
31 |
|
|
|
|
|
32 |
with st.spinner("Loading Model..."):
|
33 |
model, base_model, tokenizer, data = load_model()
|
34 |
|
35 |
+
col1, col2, col3 = st.columns(3)
|
36 |
+
|
37 |
+
with col1:
|
38 |
+
st.write(' ')
|
39 |
+
|
40 |
+
with col2:
|
41 |
+
placeholder = st.empty()
|
42 |
+
st.markdown("""<h2 style="text-align:center;">Fake News Detection AI</h2>""", unsafe_allow_html=True)
|
43 |
+
user_input = st.text_input("Article url")
|
44 |
+
submit = st.button("submit")
|
45 |
+
|
46 |
+
with col3:
|
47 |
+
st.write(' ')
|
48 |
+
|
49 |
|
50 |
if submit:
|
51 |
+
placeholder.empty()
|
52 |
last_time = time.time()
|
53 |
with st.spinner("Reading Article..."):
|
54 |
scrap = Scrap(user_input)
|