sofzcc commited on
Commit
d2bd15a
·
verified ·
1 Parent(s): d4d4d4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -101,10 +101,10 @@ if st.button("Evaluate"):
101
  predicted_label, probabilities = classify_text(news_text)
102
  st.write(f"The news article is predicted to be: **{predicted_label}**")
103
  except:
104
- st.write("It wasn't possible to fetch the article text. Enter the news article text below to check if it's real or fake:")
105
- news_text = st.text_area("News text", height=300)
106
- predicted_label, probabilities = classify_text(news_text)
107
- st.write(f"The news article is predicted to be: **{predicted_label}**")
108
-
109
  else:
110
  st.write("Please enter some news URL to evaluate.")
 
101
  predicted_label, probabilities = classify_text(news_text)
102
  st.write(f"The news article is predicted to be: **{predicted_label}**")
103
  except:
104
+ if st.button("Evaluate"):
105
+ st.write("It wasn't possible to fetch the article text. Enter the news article text below to check if it's real or fake:")
106
+ news_text = st.text_area("News text", height=300)
107
+ predicted_label, probabilities = classify_text(news_text)
108
+ st.write(f"The news article is predicted to be: **{predicted_label}**")
109
  else:
110
  st.write("Please enter some news URL to evaluate.")