TruthMachine is a Django-based web application designed to personalize and evaluate news articles using machine learning. Unlike typical news aggregators, this platform not only recommends articles based on user preferences but also performs fact-checking to determine how credible each article is.
The core feature of TruthMachine is a custom-trained logistic regression model that analyzes article content and assigns a truth score. This score reflects the likelihood that the article is factually accurate, helping users critically assess what they read. The model is trained on labeled datasets of real and fake news articles, using TF-IDF vectorization and a supervised learning approach.
The system also includes user registration, login, article search, a personalized dashboard, and a feedback form for continual improvement.
- Truth score generation using a logistic regression fact-checking model
- User authentication (registration, login, logout, password reset)
- Search interface for querying news articles in real time
- Personalized dashboard based on user interest
- Article detail view with credibility score
- Feedback form to enhance recommendation quality
- Admin panel for managing users and content
- Django (Python Web Framework)
- SQLite (Development database)
- HTML, CSS, Bootstrap (Frontend UI)
- TF-IDF & Logistic Regression (Machine Learning for fact checking)
- News APIs (e.g., New York Times API, GNews)
- Matplotlib (for visualizing ROC curve)
- Joblib (for saving trained model and vectorizer)
-
Clone the repository
git clone https://github.com/JesusJoenas/TruthMachine.git cd TruthMachine -
Create and activate a virtual environment
On Windows:
python -m venv myenv myenv\Scripts\activate
On macOS/Linux:
python3 -m venv myenv source myenv/bin/activate -
Install dependencies
pip install -r requirements.txt
-
Apply migrations and start the server
python manage.py makemigrations python manage.py migrate python manage.py runserver
-
Access the app
Navigate to:
http://127.0.0.1:8000/
Create a superuser account:
python manage.py createsuperuserThen log in at http://127.0.0.1:8000/admin/
manage.py– Entry point for Django commandspersonalised_news/– Main project settingsnews_app/– Application logic (models, views, URLs, utils)templates/– HTML templates for frontend renderingstatic/– CSS, JavaScript, and image assetsfact_check_model/– Contains trained model, vectorizer, and ROC curverequirements.txt– Python dependencies
Developed by Jesus Joenas as part of a software engineering project exploring personalized content delivery and automated fact-checking.
GitHub: https://github.com/JesusJoenas
Portfolio: https://jesusjoenas.github.io