TruthGuard is an AI-powered system designed to combat fake news through advanced AI and content moderation. The project leverages technologies like Llama 3 to distinguish between authentic and misleading information in real-time across digital platforms. This README focuses on the backend implementation of the project.
- Real-time detection of fake news using AI algorithms
- Content moderation to ensure trustworthy information dissemination
- User-friendly interface for seamless interaction and feedback (frontend implementation)
- Python 3.11
- Flask (Web Framework)
- Together AI (Llama 3 model)
- Pandas (Data manipulation)
- Scikit-learn (Machine Learning)
- LlamaIndex (Knowledge graph system)
- Milvus (Vector Database)
- Clone the repository
- Install required dependencies:
pip install -r requirements.txt - Set up environment variables:
TOGETHER_API_KEY: Your Together AI API key
To run the Flask application locally:
python app.py
The server will start running on http://localhost:5000.
You can test the API locally using Postman or any API client. Additionally, the backend is deployed on Render and can be accessed at:
https://truthguard-ai-fake-news-detection-with.onrender.com
- Open Postman.
- Create a new POST request to:
http://localhost:5000/classify - Set the request body to JSON format with an "article" key containing the news text:
{ "article": "Your news article text here" } - Send the request and check the response.
- Open Postman.
- Create a new POST request to:
https://truthguard-ai-fake-news-detection-with.onrender.com/classify - Set the request body to JSON format with an "article" key containing the news text:
{ "article": "Your news article text here" } - Send the request and check the response.
/classify(POST): Classify a news article as real or fake- Input: JSON object with an "article" key containing the news text
- Output: JSON object with a "classification" key indicating "real" or "fake"
The Llama 3 model was fine-tuned on the WELFake dataset using Together AI's platform. The fine-tuning script is available in fine_tune_llama3.py.
- Implement the KNN model and RAG pipeline as described in fake-news-detection-full-code.py
- Integrate Milvus vector database for efficient similarity search
- Expand the system to handle multiple languages
- Implement user feedback mechanism for continuous learning
- Reema Memon - NLP Engineer (Team Lead)
- Sami Raza - AI Developer
- Letlhogonolo Fanampe - AI Specialist
- Wajahat Ali Hassan - Backend Developer
- Muhammad Qasim - Frontend Developer
- Muhammad Hassan - Full Stack Developer
Contributions to improve TruthGuard are welcome. Please follow these steps:
- Fork the repository
- Create a new branch
- Make your changes and commit them
- Create a pull request
This project is licensed under the MIT License. See the LICENSE file for details.
For more information, please contact:
- Letlhogonolo Fanampe
- Email: Lfanampe@gmail.com
- GitHub: djpapzin
- LinkedIn: linkedin.com/in/djpapzin
Thank you for your interest in TruthGuard!
