Valid8 is a fact-checking and analysis system that utilizes a completely open-source technology stack to verify information efficiently. It features a Uvicorn-powered FastAPI server that retrieves sources from DuckDuckGo, Google, and Wikipedia to provide reliable references.
The system can analyze tweets using their Tweet ID, making it easy to fact-check social media claims. Additionally, a browser extension enables users to select any text on a webpage and instantly analyze its credibility across the internet.
To process and structure retrieved data, the system leverages Groq for optimized querying. The information is then analyzed by mixtral-8x7b-32768 and llama-3.3-70b-versatile, both open-source LLMs, to determine the accuracy of the given fact.
You can check out the demo here
- Real-time Tweet Analysis: Fetch and analyze tweets instantly
- Multi-Source Verification: Aggregate data from Google, DuckDuckGo, and Wikipedia
- Chrome Extension : Chrome Extension For Quick Analysis throughout the Web
- AI-Powered Analysis: Advanced claim verification using Groq AI
- Source Credibility: Evaluate source reliability and relevance
- Comprehensive Reports: Detailed fact-checking results with evidence
- Engagement Analysis: Consider social context and virality
- Async Processing: Handle multiple requests efficiently
- Python 3.9+
- Javascript
- Twitter API Bearer Token
- Groq API Key
- GOOGLE_API_KEY
- GOOGLE_CSE_ID
- OCR_API_KEY
- FastAPI
- uvicorn
- valkey
- streamlit
- Chromium Extension system
- Clone the repository:
git clone https://github.com/Psingle20/Valid8rs.git
cd Valid8rs
- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create
.env
file:
GROQ_API_KEY=your_groq_api_key
TWITTER_BEARER_TOKEN=your_twitter_bearer_token
ENVIRONMENT=development
LOG_LEVEL=INFO
GOOGLE_CSE_ID=your_google_cse_id
GOOGLE_API_KEY=your_google_api_key
OCR_API_KEY= your OCR_API_KEY
- Run the application:
uvicorn app.main:app --reload
- Clone the repository:
git clone https://github.com/Psingle20/Valid8rs.git
cd Valid8rs
- Create
.env
file:
GROQ_API_KEY=your_groq_api_key
TWITTER_BEARER_TOKEN=your_twitter_bearer_token
ENVIRONMENT=development
LOG_LEVEL=INFO
GOOGLE_CSE_ID=your_google_cse_id
GOOGLE_API_KEY=your_google_api_key
OCR_API_KEY= your OCR_API_KEY
3.Build the Docker image
docker build -t fastapi_image .
docker run -d -p 8000:8000 fastapi_image:latest
-
Enable the Chrome Developer mode.
-
Go to chrome extension window and click on load unpacked.
-
From the file manager select the Valid8rs/extension folder.
-
The extension is now enabled!
-
Now select any text on any website and right click a menu will appear which contains Check for Misinformation option.
POST /api/v1/check/tweet
{
"tweet_id": "1234567890",
"background_check": false
}
POST /api/v1/check/text
{
"text": "Your text to fact check",
"background_check": false
}
GET /api/v1/check/{check_id}
{
"check_id": "uuid",
"status": "completed",
"started_at": "2024-11-24T12:00:00Z",
"completed_at": "2024-11-24T12:00:30Z",
"results": {
"responses": [
"Fact Check Results",
"Evidence Analysis",
"Source Analysis"
],
"analysis": {
"verdict": "True/False/Partially True",
"confidence": "high/medium/low",
// ... more analysis details
}
}
}
Valid8rs/
├── app/
│ ├── api/
│ │ ├── routes.py # API endpoints
│ │ ├── models.py # Pydantic models
│ │ └── dependencies.py
│ ├── core/
│ │ ├── twitter.py # Twitter integration
│ │ ├── search.py # Search tools
│ │ ├── analysis.py # Groq analysis
│ │ └── workflow.py # Fact-check workflow
│ ├── services/
│ │ └── fact_checker.py
│ └── utils/
│ └── logging.py
├──frontend/
| ├──Streamlit_app.py #frontend
|
├──extension/ #files related to extension
|
├──dockerfile # Docker setup
├── requirements.txt
├── .env.example
└── README.md
Variable | Description | Required |
---|---|---|
GROQ_API_KEY | Your Groq API key | Yes |
GOOGLE_CSE_ID | Your Google CSE key | Yes |
GOOGLE_API_KEY | Your Google API key | Yes |
OCR_API_KEY | Your OCR API KEY | Yes |
TWITTER_BEARER_TOKEN | Twitter API bearer token | Yes |
ENVIRONMENT | development/production | No |
LOG_LEVEL | INFO/DEBUG/WARNING/ERROR | No |
CACHE_TTL | Cache time-to-live in seconds | No |
MAX_WORKERS | Maximum worker threads | No |
|