lifewjola commited on
Commit
b2610b0
·
1 Parent(s): d9f0909

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -81,10 +81,9 @@ def predict_sarcasm(new_sentence):
81
  return prediction
82
 
83
  example_headlines = [
84
- "Research Study Confirms Regular Exercise Improves Mental Health",
85
- "Scientists Develop Teleportation Device, but You'll Need to Pay for Shipping",
86
- "New Study Reveals Benefits of Eating More Vegetables"
87
- "Aliens Land on Earth, Admit They're Just Here for the Memes"
88
  ]
89
 
90
  st.write("No news headline ideas? You can simply copy and paste any of the following headlines to test:")
@@ -95,6 +94,6 @@ input_text = st.text_input("Enter a news headline:")
95
  if input_text:
96
  prediction = predict_sarcasm(input_text)
97
  if prediction >= 0.5:
98
- st.write(f"This headline is sarcastic.")
99
  else:
100
- st.write(f"This headline is not sarcastic.")
 
81
  return prediction
82
 
83
  example_headlines = [
84
+ "Local School Celebrates Opening of New Science Lab",
85
+ "Aliens Land on Earth, Admit They're Just Here for the Memes",
86
+ "City Council Approves Funding for Public Transportation Expansion"
 
87
  ]
88
 
89
  st.write("No news headline ideas? You can simply copy and paste any of the following headlines to test:")
 
94
  if input_text:
95
  prediction = predict_sarcasm(input_text)
96
  if prediction >= 0.5:
97
+ st.write(f"This headline is sarcastic. (score: {prediction}*100%)")
98
  else:
99
+ st.write(f"This headline is not sarcastic. (score: {prediction}*100%)")