Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ NEWS_API_KEY = "8863858610844ed7aa815d431846c143"
|
|
| 19 |
# βββββββββββββββββββββββββββββββββββββββββββββ
|
| 20 |
# Model: Pre-trained fine-tuned BERT for fake news
|
| 21 |
# No training needed β loaded directly from HuggingFace Hub
|
| 22 |
-
MODEL_NAME = "
|
| 23 |
# βββββββββββββββββββββββββββββββββββββββββββββ
|
| 24 |
|
| 25 |
# Source credibility database
|
|
@@ -441,13 +441,16 @@ if mode == "π Paste Article / Text":
|
|
| 441 |
vcol1, vcol2, vcol3 = st.columns([1, 2, 1])
|
| 442 |
with vcol2:
|
| 443 |
if prediction == "FAKE":
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
|
|
|
|
|
|
|
|
|
|
| 451 |
else:
|
| 452 |
st.markdown(f"""
|
| 453 |
<div class="verdict-real">
|
|
|
|
| 19 |
# βββββββββββββββββββββββββββββββββββββββββββββ
|
| 20 |
# Model: Pre-trained fine-tuned BERT for fake news
|
| 21 |
# No training needed β loaded directly from HuggingFace Hub
|
| 22 |
+
MODEL_NAME = "jy46604790/Fake-News-Bert-Detect"
|
| 23 |
# βββββββββββββββββββββββββββββββββββββββββββββ
|
| 24 |
|
| 25 |
# Source credibility database
|
|
|
|
| 441 |
vcol1, vcol2, vcol3 = st.columns([1, 2, 1])
|
| 442 |
with vcol2:
|
| 443 |
if prediction == "FAKE":
|
| 444 |
+
low_conf = confidence < 0.75
|
| 445 |
+
warning = "<div style='color:#fbbf24;font-size:0.85rem;margin-top:0.5rem'>β Low confidence β verify manually before concluding</div>" if low_conf else ""
|
| 446 |
+
st.markdown(f"""
|
| 447 |
+
<div class="verdict-fake">
|
| 448 |
+
<div class="verdict-label fake-label">β FAKE NEWS</div>
|
| 449 |
+
<div style="color:#94a3b8;margin-top:0.4rem;font-size:0.95rem;">
|
| 450 |
+
Confidence: <b style="color:#f8fafc">{confidence*100:.1f}%</b>
|
| 451 |
+
</div>
|
| 452 |
+
{warning}
|
| 453 |
+
</div>""", unsafe_allow_html=True)
|
| 454 |
else:
|
| 455 |
st.markdown(f"""
|
| 456 |
<div class="verdict-real">
|