hackathon

Fake News Detector Project Title: Fake News Detector – AI-powered Chrome Extension

📝 Project Overview (Long Description): Problem: With the rise of misinformation, especially on social media and unreliable websites, people are often misled by fake news. Most users do not have the time or skill to verify the accuracy of articles they read.

Solution: Our project is a Chrome Extension powered by AI that allows users to check whether a news article is real or fake in just one click. When the user visits a website, the extension extracts the main article text, sends it to a Python-based AI backend, which uses a pre-trained BERT model to detect whether the content is fake or not.

Target Audience:

Everyday internet users

Journalists

Students

Researchers

Fact-checkers

Unique Features:

One-click fake news detection

Uses NLP and machine learning (AI)

Lightweight Chrome Extension

Hosted API with pre-trained HuggingFace model

Quick, user-friendly results

🛠 Technologies Used: Area Technology Frontend HTML, CSS, JavaScript (Vanilla) Chrome Extension Chrome APIs (manifest.json) Backend (AI) Python, Flask, Transformers AI Model HuggingFace (bert-tiny-fake-news) Hosting Replit / Render (for Flask API) Code Repo GitHub

How It Works (Workflow): User opens a news article in Chrome.

Clicks the extension icon.

Extension extracts main text from the page using content.js.

Text is sent to Flask API (/predict endpoint).

Flask API loads BERT model and predicts if the news is fake or real.

Result is returned and displayed in the popup as:

✅ Real News or ❌ Fake News (plus a confidence score)

🧠 AI Model Details Model Name: mrm8488/bert-tiny-finetuned-fake-news

Type: BERT NLP model

How to Use: HuggingFace Transformers library

Input: News article (string)

Output: Label = Fake or Real + Confidence Score

Set up Python + Flask environment

Install dependencies: transformers, torch, Flask

Load fake news model

Create /predict API endpoint

Test API with sample input (using Postman or curl)

Host API on Replit or Render

Create Chrome Extension files: popup.html, popup.js, manifest.json

Extract current page text using content.js

Send extracted text to your Flask API

Display result in the extension popup

Record a 2-3 min demo video showing everything

Upload project to GitHub Chrome Extension Files Overview manifest.json json Copy Edit { “manifest_version”: 3, “name”: “Fake News Detector”, “version”: “1.0”, “permissions”: [“activeTab”, “scripting”], “action”: { “default_popup”: “popup.html” }, “background”: { “service_worker”: “background.js” }, “content_scripts”: [ { “matches”: [“"], "js": ["content.js"] } ] } popup.html Basic UI with button and result area.

popup.js Handles button click → sends request → shows result.

content.js Extracts article text from the webpage (you can use basic DOM methods or document.body.innerText).

🌐 API (Flask) Example Code python Copy Edit from flask import Flask, request, jsonify from transformers import pipeline

app = Flask(name) classifier = pipeline(“text-classification”, model=”mrm8488/bert-tiny-finetuned-fake-news”)

@app.route(‘/predict’, methods=[‘POST’]) def predict(): data = request.get_json() text = data[‘text’] result = classifier(text) return jsonify(result)

if name == ‘main’: app.run(debug=True)

Submission Checklist (As Per LabLab.ai) Requirement Done? Short Description ✅ Yes Long Description ✅ Yes Tags (AI, NLP, Chrome, Fake News) ✅ Yes Cover Image 🔜 (Use Canva/Figma, I can help) Presentation Slides (PDF) 🔜 (I can help write the content) Demo Video (≤ 5 min) 🔜 Record screen with Loom or OBS GitHub Repo (Public) 🔜 Upload after completion Hosted Demo 🔜 Flask app on Render/Replit Application URL 🔜 Replit/Render Link Business Value, Market, Revenue 🔜 I’ll help you fill these in slides