Facto is a Real-Time Misinformation Detection and Verification System for Broadcast Media. It analyzes news from various sources in real-time, validates its credibility, and provides accurate information to users.
Ensure that you have the following software installed before setting up the project:
- Node.js (v14 or later)
- npm (v6 or later)
- python
- pip
- Clone the repository:
git clone https://github.com/vatsal-afk/facto.git
- Set up the Backend:
For UNIX (Mac/Linux) Users:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
chmod +x run_backend.sh
./run_backend.sh
For Windows Users (PowerShell)
python -m venv venv
venv\Scripts\Activate
pip install -r requirements.txt
Set-ExecutionPolicy Unrestricted -Scope Process
./run_backend.ps1
- Set up the Frontend:
Navigate to the
@/frontend
directory:
cd ../frontend
npm install
npm run dev
To configure the project, create a .env
file in the root directory with
(feel free to mail the developers for the environment variables)
GUARDIAN_API_KEY = ""
NEWS_API_KEY = ""
REDDIT_CLIENT_ID = ''
REDDIT_CLIENT_SECRET = ""
NEXT_PUBLIC_GUARDIAN_API_KEY = ""
NEXT_PUBLIC_YOUTUBE_API_KEY = ""
NEXT_PUBLIC_DEPLOYED_CONTRACT_ADDRESS = "0xA1d0071641C156d7fd035Fa01169a164EEe3B786"
NEXT_PUBLIC_GOOGLE_API_KEY = ""
NEXT_PUBLIC_NEWS_API_KEY = ""
MONGODB_URI = "mongodb+srv://tanmaysdream9460:[email protected]/facto"
NEXTAUTH_SECRET="do_not_fall_in_trap"
NEXTAUTH_URL="http://localhost:3000"
NEXT_PUBLIC_GOOGLE_CUSTOM_SEARCH_ENGINE_ID=""
- Custom News Input for Verification
- Graphical Analysis of Custom News
- YouTube News Verification System
- Role-Based Access Control
- Blockchain-Based Voting for Verified Users
- Discussion Forum for General Users
- Trending News and Social Media Insights
To improve the reliability and credibility of the platform, users can become verified based on their contributions, such as sharing news insights or engaging in discussions. This feature is designed for professionals or individuals who actively contribute to the platformβs goals. π
-
Sign Up π:
Visit the Auth Page and sign up as a general user. -
Submit Credentials π:
Provide documentation that confirms your professional background or contributions to specific news topics. -
Verification Review π:
The verification team will assess your submission and confirm your status within a few days. -
Voting Access π³οΈ:
After verification, you'll gain the ability to vote on news accuracy and contribute to the modelβs evaluation.
-
Contribute Meaningfully π: Verified users can vote to determine whether news is real or fake.
-
Build Credibility π: Verified status enhances your recognition as a trustworthy participant.
-
Support Accuracy π: Your verified status helps improve the quality of news verification.
For getting the feedback of the generalist and verified user we will have the voting feature for the verdict that is being generated by the server, and here is a quick walkthrough for that:
First you will connect to the metamask and login to get the blockchain server started then there will be the traction page appearing.
In the transaction page, once the transaction is completed you will be able to vote.
Just click on the upvote and downvote option to express your required sentiments.
This feature collects and analyzes the latest news articles from reliable sources like The Guardian, Reddit, and News API. Using libraries like BeautifulSoup for HTML parsing, Requests for HTTP requests, and praw for accessing Redditβs API, the platform retrieves diverse and up-to-date content. The data is then processed for analysis and insights, ensuring relevant news is always available for verification.
This model verifies the authenticity of news by comparing custom inputs to trusted sources. It uses advanced natural language processing (NLP) and embedding-based similarity checks to assess the credibility of news claims.
- πEmbedding-Based Comparison: Compares news input embeddings with external sources to check for similarities.
- πFact Density: Measures the factual depth of news to detect sensationalism.
- π€Lexical Diversity: Assesses vocabulary richness to flag repetitive or overly simplified language.
- πSentiment Analysis: Evaluates emotional bias in the content, aiming for neutrality.
- πReadability: Ensures content is clear and not oversimplified.
- βοΈInput News: Custom news input is provided.
- π§ Embedding Extraction: The input is transformed into embeddings.
- πSimilarity Check: The model compares the embeddings to trusted sources.
- π§Refinement: Additional parameters (fact density, sentiment, etc.) refine the decision.
- β Output: The model returns a credibility score and a verdict (real or fake).
- Bar charts and interactive symbols display scores for each parameter, providing a clear visual summary of the news verification process.
- Knowledge graph for getting the sense out of the news.
Feature | Models/Tools |
---|---|
Embedding Comparison | BERT, RoBERTa, SBERT |
Fact Density | T5, GPT, Google Knowledge Graph API |
Lexical Diversity | spaCy, TextBlob |
Sentiment Analysis | VADER Sentiment, BERT-Sentiment |
Readability Scoring | Flesch-Kincaid Readability Tests, Custom Algorithms |
This repository contains a Live News Verification Model that processes YouTube videos to verify the authenticity of news. The model extracts audio, transcribes it, and analyzes the content in smaller, meaningful chunks to ensure accurate evaluation.
-
π΅ Audio Extraction
Extract audio directly from YouTube videos usingyoutube-dlp
. -
π Whisper for Transcription
Convert audio to text with high accuracy using the Whisper model. -
π News Chunking
Break transcribed text into smaller, context-specific chunks for efficient analysis. -
ββ Fake News Classification
Analyze and classify news chunks as real or fake using trusted source comparison. -
β³ Timestamp Flexibility
Start analyzing from a specific timestamp for focused evaluations.
Feature | Models/Tools |
---|---|
Audio Extraction | youtube-dlp |
Audio Transcription | Whisper |
Embedding Comparison | BERT, RoBERTa |
Fake News Classification | SBERT, GPT |
Chunking & Analysis | spaCy, Custom Algorithms |
- Input Video: Upload the YouTube video URL to be analyzed.
- Audio Conversion: Extract audio from the video using
youtube-dlp
. - Audio Transcription: Transcribe the extracted audio to text using the Whisper model.
- Content Chunking: Split the transcription into smaller chunks for detailed analysis.
- Verification: Compare each chunk with embeddings from trusted sources to classify news as real β or fake β.
- Timestamp Selection: Optionally select a starting timestamp for targeted analysis.
- Detailed classification for each chunk with timestamps.
- Bar charts and credibility scores for visual summary.
Here is a detailed flowchart showing various routes:
sequenceDiagram
participant User
participant Dashboard
participant Auth
participant TrendAnalysis
participant Counter
participant LiveBroadcast
participant Transcribe
participant Process
participant CustomNews
participant GraphAnalysis
participant Bills
participant UN
participant SocialMedia
User->>Dashboard: Access Tailor-made Dashboard
Dashboard->>Auth: User Login (Journalist/General)
Auth->>Dashboard: Return Authenticated User
Dashboard->>TrendAnalysis: Analyze Recent News Articles
TrendAnalysis->>Counter: Vote on Articles
Dashboard->>LiveBroadcast: Analyze Live YouTube Broadcast
LiveBroadcast->>Transcribe: Use yt-dlp & FFmpeg for Audio Extraction
Transcribe->>Process: Summarize Transcription
Dashboard->>CustomNews: Input Custom News Data
CustomNews->>GraphAnalysis: Analyze Custom News
Dashboard->>Bills: Get Recent Parliamentary Bills
Dashboard->>UN: Get Latest UN Convention Updates
Dashboard->>SocialMedia: Analyze Social Media Links
Note right of TrendAnalysis: Trend analysis helps in identifying fake news
Note right of Counter: Voting allows users to reduce misinformation
Note right of LiveBroadcast: Extracting and transcribing YouTube live videos
Note right of GraphAnalysis: Web scraping and graph-based news analysis
Developed by Cybr_Rakshak π