chirag1121 commited on
Commit
08af157
Β·
verified Β·
1 Parent(s): 35ef5a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
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 = "hamzab/roberta-fake-news-classification"
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
- st.markdown(f"""
445
- <div class="verdict-fake">
446
- <div class="verdict-label fake-label">⚠ FAKE NEWS</div>
447
- <div style="color:#94a3b8;margin-top:0.4rem;font-size:0.95rem;">
448
- Confidence: <b style="color:#f8fafc">{confidence*100:.1f}%</b>
449
- </div>
450
- </div>""", unsafe_allow_html=True)
 
 
 
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">