Update app.py
Browse files
app.py
CHANGED
@@ -81,10 +81,9 @@ def predict_sarcasm(new_sentence):
|
|
81 |
return prediction
|
82 |
|
83 |
example_headlines = [
|
84 |
-
"
|
85 |
-
"
|
86 |
-
"
|
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%)")
|