# akash0826/student-performance-predictor architecture

> Architecture diagram of the GitHub repository akash0826/student-performance-predictor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/akash0826/student-performance-predictor
- Repository: https://github.com/akash0826/student-performance-predictor

## Overview

This is a Flask student-performance predictor: users submit demographic and reading/writing-score inputs and receive a predicted maths score. Its training workflow ingests a dataset, splits it, transforms features, evaluates regressors, and saves model artifacts; serving converts form data to a dataframe, loads the saved preprocessor and model, and predicts. The README also claims AWS deployment, but the sampled runtime code does not show an AWS integration. The graph follows shown calls and documented behavior; unsampled templates and deployment details are not inferred.

Main entry points: [`src/pipeline/predict_pipeline.py`](https://github.com/akash0826/student-performance-predictor/blob/main/src/pipeline/predict_pipeline.py) (Prediction pipeline), [`src/components/data_ingestion.py`](https://github.com/akash0826/student-performance-predictor/blob/main/src/components/data_ingestion.py) (Data ingestion), [`app.py`](https://github.com/akash0826/student-performance-predictor/blob/main/app.py) (Flask routes), [`src/exception.py`](https://github.com/akash0826/student-performance-predictor/blob/main/src/exception.py) (Custom errors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web prediction"]
  node_flask["Flask routes<br/>[app.py]"]
  node_wsgi["WSGI entry<br/>[application.py]"]
  node_forms["Prediction forms"]
  node_custom_data["Input dataframe"]
  node_predict["Prediction pipeline"]
end

subgraph group_training["Model training"]
  node_dataset["Student dataset"]
  node_ingestion["Data ingestion<br/>[data_ingestion.py]"]
  node_transformation["Feature transformation"]
  node_trainer["Model evaluation<br/>[model_trainer.py]"]
end

subgraph group_persistence["Artifacts and utilities"]
  node_artifacts[("Model artifacts")]
  node_utilities["Serialization and scoring<br/>[utils.py]"]
end

subgraph group_support["Shared support"]
  node_errors["Custom errors<br/>[exception.py]"]
  node_logging["Logging<br/>[logger.py]"]
end

node_user(("User"))

node_user -->|"submits form"| node_flask
node_flask -->|"renders"| node_forms
node_flask -->|"builds input"| node_custom_data
node_flask -->|"invokes"| node_predict
node_predict -->|"returns prediction"| node_flask
node_wsgi -->|"renders"| node_forms
node_wsgi -->|"builds input"| node_custom_data
node_wsgi -->|"invokes"| node_predict
node_ingestion -->|"reads"| node_dataset
node_ingestion -->|"writes splits"| node_artifacts
node_ingestion -->|"invokes"| node_transformation
node_ingestion -->|"invokes"| node_trainer
node_transformation -->|"saves preprocessor"| node_artifacts
node_transformation -->|"serializes via"| node_utilities
node_trainer -->|"evaluates and saves via"| node_utilities
node_trainer -->|"saves model"| node_artifacts
node_predict -->|"loads via"| node_utilities
node_predict -->|"loads model and preprocessor"| node_artifacts
node_transformation -->|"raises"| node_errors
node_trainer -->|"raises"| node_errors
node_ingestion -->|"raises"| node_errors
node_predict -->|"raises"| node_errors
node_errors -->|"uses"| node_logging

click node_flask "https://github.com/akash0826/student-performance-predictor/blob/main/app.py"
click node_wsgi "https://github.com/akash0826/student-performance-predictor/blob/main/application.py"
click node_forms "https://github.com/akash0826/student-performance-predictor/tree/main/templates"
click node_custom_data "https://github.com/akash0826/student-performance-predictor/blob/main/src/pipeline/predict_pipeline.py"
click node_predict "https://github.com/akash0826/student-performance-predictor/blob/main/src/pipeline/predict_pipeline.py"
click node_dataset "https://github.com/akash0826/student-performance-predictor/blob/main/notebook/data/StudentsPerformance.csv"
click node_ingestion "https://github.com/akash0826/student-performance-predictor/blob/main/src/components/data_ingestion.py"
click node_transformation "https://github.com/akash0826/student-performance-predictor/blob/main/src/components/data_transformation.py"
click node_trainer "https://github.com/akash0826/student-performance-predictor/blob/main/src/components/model_trainer.py"
click node_artifacts "https://github.com/akash0826/student-performance-predictor/tree/main/artifacts"
click node_utilities "https://github.com/akash0826/student-performance-predictor/blob/main/src/utils.py"
click node_errors "https://github.com/akash0826/student-performance-predictor/blob/main/src/exception.py"
click node_logging "https://github.com/akash0826/student-performance-predictor/blob/main/src/logger.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_flask,node_wsgi,node_forms,node_custom_data,node_predict,node_user toneBlue
class node_dataset,node_ingestion,node_transformation,node_trainer toneAmber
class node_artifacts,node_utilities toneMint
class node_errors,node_logging toneRose
```

## Components

### Web prediction

- [Flask routes](https://github.com/akash0826/student-performance-predictor/blob/main/app.py): `app.py`
- [WSGI entry](https://github.com/akash0826/student-performance-predictor/blob/main/application.py): `application.py`
- [Prediction forms](https://github.com/akash0826/student-performance-predictor/tree/main/templates): `templates`
- [Input dataframe](https://github.com/akash0826/student-performance-predictor/blob/main/src/pipeline/predict_pipeline.py): `src/pipeline/predict_pipeline.py`
- [Prediction pipeline](https://github.com/akash0826/student-performance-predictor/blob/main/src/pipeline/predict_pipeline.py): `src/pipeline/predict_pipeline.py`

### Model training

- [Student dataset](https://github.com/akash0826/student-performance-predictor/blob/main/notebook/data/StudentsPerformance.csv): `notebook/data/StudentsPerformance.csv`
- [Data ingestion](https://github.com/akash0826/student-performance-predictor/blob/main/src/components/data_ingestion.py): `src/components/data_ingestion.py`
- [Feature transformation](https://github.com/akash0826/student-performance-predictor/blob/main/src/components/data_transformation.py): `src/components/data_transformation.py`
- [Model evaluation](https://github.com/akash0826/student-performance-predictor/blob/main/src/components/model_trainer.py): `src/components/model_trainer.py`

### Artifacts and utilities

- [Model artifacts](https://github.com/akash0826/student-performance-predictor/tree/main/artifacts): `artifacts`
- [Serialization and scoring](https://github.com/akash0826/student-performance-predictor/blob/main/src/utils.py): `src/utils.py`

### Shared support

- [Custom errors](https://github.com/akash0826/student-performance-predictor/blob/main/src/exception.py): `src/exception.py`
- [Logging](https://github.com/akash0826/student-performance-predictor/blob/main/src/logger.py): `src/logger.py`

### Other components

- **User**

## Connections

- User → Flask routes: submits form (evidence: `app.py`)
- Flask routes → Prediction forms: renders (evidence: `app.py`)
- Flask routes → Input dataframe: builds input (evidence: `app.py`)
- Flask routes → Prediction pipeline: invokes (evidence: `app.py`)
- Prediction pipeline → Flask routes: returns prediction (evidence: `app.py`)
- WSGI entry → Prediction forms: renders (evidence: `application.py`)
- WSGI entry → Input dataframe: builds input (evidence: `application.py`)
- WSGI entry → Prediction pipeline: invokes (evidence: `application.py`)
- Data ingestion → Student dataset: reads (evidence: `src/components/data_ingestion.py`)
- Data ingestion → Model artifacts: writes splits (evidence: `src/components/data_ingestion.py`)
- Data ingestion → Feature transformation: invokes (evidence: `src/components/data_ingestion.py`)
- Data ingestion → Model evaluation: invokes (evidence: `src/components/data_ingestion.py`)
- Feature transformation → Model artifacts: saves preprocessor (evidence: `src/components/data_transformation.py`)
- Feature transformation → Serialization and scoring: serializes via (evidence: `src/components/data_transformation.py`)
- Model evaluation → Serialization and scoring: evaluates and saves via (evidence: `src/components/model_trainer.py`)
- Model evaluation → Model artifacts: saves model (evidence: `src/components/model_trainer.py`)
- Prediction pipeline → Serialization and scoring: loads via (evidence: `src/pipeline/predict_pipeline.py`)
- Prediction pipeline → Model artifacts: loads model and preprocessor (evidence: `src/pipeline/predict_pipeline.py`)
- Feature transformation → Custom errors: raises (evidence: `src/components/data_transformation.py`)
- Model evaluation → Custom errors: raises (evidence: `src/components/model_trainer.py`)
- Data ingestion → Custom errors: raises (evidence: `src/components/data_ingestion.py`)
- Prediction pipeline → Custom errors: raises (evidence: `src/pipeline/predict_pipeline.py`)
- Custom errors → Logging: uses (evidence: `src/exception.py`)
