https://deepfake-3ux1.onrender.com/ Deep Fake is a Django-based AI content detection studio for checking whether an image looks fake and whether an essay looks AI-generated. Real vs fake image detection using a custom CNN served with Django.
- Image detector powered by a custom PyTorch CNN.
- Text detector powered by a PyTorch RNN with TF-IDF features.
- Shared website shell with a navbar and room for more detectors later.
- Clean, responsive UI with live image preview and separate pages for each tool.
- Volatile uploads only. Nothing is persisted after inference.
Homeintroduces the product and links to each detector.Image Checkaccepts an image upload and returns a real/fake verdict.Text Checkaccepts an essay and returns an AI/human-written verdict.
deepfake_web/- Django project settings, URLs, and WSGI entry point.
predictor/- Views, forms, and model-loading helpers.
templates/base.htmlshared shell.home.htmllanding page.image_detector.htmlimage workflow.text_detector.htmlessay workflow.
static/predictor/- CSS for the entire site.
Input: 3 x 32 x 32
Conv2d(3 -> 32, kernel=3, padding=1)
ReLU
MaxPool2d(2)
Conv2d(32 -> 64, kernel=3, padding=1)
ReLU
MaxPool2d(2)
Conv2d(64 -> 128, kernel=3, padding=1)
ReLU
MaxPool2d(2)
Flatten
Linear(2048 -> 256)
ReLU
Linear(256 -> 1)
Sigmoid
Input: TF-IDF features with max_features=5000
TF-IDF vectorizer
RNN(input_size=5000, hidden_size=128)
Linear(128 -> 1)
Sigmoid
- User opens the relevant page from the navbar.
- Django receives the image or text input.
- The input is normalized to match training.
- The model runs in evaluation mode with
torch.no_grad(). - The app returns a human-readable verdict and a score.
The project expects the venv at:
/Users/aayannoori/Desktop/django/.venv
/Users/aayannoori/Desktop/django/.venv/bin/python -m pip install -r requirements.txt/Users/aayannoori/Desktop/django/.venv/bin/python manage.py runserverOpen:
http://127.0.0.1:8000/
- Gunicorn is the production server.
- WhiteNoise serves static files.
- PostgreSQL is preferred, with SQLite fallback if Postgres is unavailable.
predictor/services.pypredictor/views.pytemplates/base.htmltemplates/image_detector.htmltemplates/text_detector.html
The essay detector also expects:
best_rnn_weights.pthtfidf_vectorizer.pkl
The weights file is already in the repo. If the vectorizer is not present yet, the page still renders and shows a setup hint instead of crashing.