How gopi-krish3/django_ml_project works
This Django application presents a Titanic survival-probability predictor. A user reaches the home page, submits passenger attributes to the prediction endpoint, and receives a rendered probability result. On import, the view code loads and preprocesses the Titanic CSV, splits and scales features, and trains a random-forest classifier; prediction scales submitted features and requests a survival probability. The README also describes model accuracy, but evaluation is not part of the user-facing result flow. Source evidence is limited to the excerpts and README; template internals were not inspected.
Main entry points: urls.py URL Routing · views.py Prediction Handler · titanic.csv Titanic Dataset · predict.html Prediction Form
Components 13
Web Interface
- URL Routing
project/project/urls.py - Home View
project/base/views.py - Prediction Handler
project/base/views.py - Prediction Form
project/templates/predict.html - Result Page
project/templates/result.html
Prediction Model
- Data Preprocessing
project/base/views.py - Feature Split
project/base/views.py - Feature Scaler
project/base/views.py - Random Forest
project/base/views.py - Model Evaluation
project/base/views.py - Probability Prediction
project/base/views.py
Passenger Data
- Titanic Dataset
project/titanic.csv
Other components
- User
Connections 13
- User → URL Routing: requests pages
project/project/urls.py - URL Routing → Home View: routes home
project/project/urls.py - URL Routing → Prediction Handler: routes prediction
project/project/urls.py - Home View → Prediction Form: renders
project/base/views.py - Prediction Handler → Result Page: renders result
project/base/views.py - Prediction Handler → Probability Prediction: requests probability
project/base/views.py - Titanic Dataset → Data Preprocessing: supplies records
project/base/views.py - Data Preprocessing → Feature Split: produces features
project/base/views.py - Feature Split → Feature Scaler: fits and transforms
project/base/views.py - Feature Scaler → Random Forest: scales training data
project/base/views.py - Random Forest → Model Evaluation: predicts test set
project/base/views.py - Feature Scaler → Probability Prediction: scales input
project/base/views.py - Random Forest → Probability Prediction: predicts probability
project/base/views.py