A modern web application that uses AI to fact-check statements and social media content. Built for the Perplexity Hackathon.
- Text Statement Fact-Checking: Enter any statement and get AI-powered fact-checking results
- URL/Link Fact-Checking: Submit URLs from Twitter, Reddit, or other platforms for verification
- Modern UI: Clean, responsive design with intuitive user experience
- Real-time Analysis: Fast AI-powered analysis using Perplexity API
- Source Citations: Detailed sources and analysis for transparency
-
Install Dependencies:
pip install -r requirements.txt
-
Set up Environment Variables: Create a
.envfile with your Perplexity API key:PERPLEXITY_API_KEY="your_api_key_here" -
Run the Application:
python3 app.py
-
Access the Website: Open your browser and go to
http://localhost:8000
- Click on "Text Statement" tab
- Enter the statement you want to fact-check
- Click "Fact Check Statement"
- View the AI analysis, verdict, and sources
- Click on "URL/Link" tab
- Paste a URL from Twitter, Reddit, or other platforms
- Click "Fact Check URL"
- View the fact-checking results
GET /- Main website interfacePOST /fact-check- Fact-checking API endpoint- Body:
{"text": "statement"}or{"url": "https://example.com"} - Returns: JSON with verdict, confidence, sources, and analysis
- Body:
perplexityhackathon/
├── app.py # Flask backend application
├── templates/
│ └── index.html # Main HTML template
├── static/
│ ├── css/
│ │ └── style.css # Styling
│ └── js/
│ └── script.js # Frontend JavaScript
├── .env # Environment variables
└── README.md # This file
- Backend: Python Flask
- AI Integration: Perplexity API
- Frontend: HTML5, CSS3, JavaScript
- Styling: Custom CSS with modern design principles
This project demonstrates:
- AI-powered fact-checking capabilities
- Modern web development practices
- Integration with external APIs
- User-friendly interface design
- Real-time data processing
Built for the Perplexity Hackathon to showcase the power of AI in combating misinformation.