# manoj914822/mlproject architecture

> Architecture diagram of the GitHub repository manoj914822/mlproject, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/manoj914822/mlproject
- Repository: https://github.com/manoj914822/mlproject

## Overview

This is a student math-score regression project with both a Flask prediction interface and model-training workflows. The web path turns form fields into a dataframe, loads saved preprocessing/model artifacts, predicts, and renders the result. Training is represented in two documented/code-supported forms: the standalone training pipeline and the ingestion-to-transformation-to-model-training component flow. The sampled code shows these paths are distinct; unsampled template details and any additional deployment wiring are not inferred.

Main entry points: [`app.py`](https://github.com/manoj914822/mlproject/blob/main/app.py) (Flask routes), [`artifacts`](https://github.com/manoj914822/mlproject/tree/main/artifacts) (Model artifacts), [`src/components/data_ingestion.py`](https://github.com/manoj914822/mlproject/blob/main/src/components/data_ingestion.py) (Data ingestion), [`src/pipeline/predict_pipeline.py`](https://github.com/manoj914822/mlproject/blob/main/src/pipeline/predict_pipeline.py) (Prediction pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Prediction web app"]
  node_flask["Flask routes<br/>[app.py]"]
  node_form["Input form<br/>[index.html]"]
  node_result["Result page<br/>[home.html]"]
  node_customdata["Form dataframe"]
  node_predict["Prediction pipeline"]
end

subgraph group_training["Model training"]
  node_ingestion["Data ingestion<br/>[data_ingestion.py]"]
  node_rawdata["Student dataset"]
  node_splits["Train/test splits<br/>[train.csv]"]
  node_transform["Feature transformation"]
  node_trainer["Model selection<br/>[model_trainer.py]"]
  node_trainpipe["Standalone training<br/>[train_pipeline.py]"]
  node_rawcsv["Training CSV<br/>[data.csv]"]
end

subgraph group_shared["Artifacts and utilities"]
  node_artifacts[("Model artifacts")]
  node_utils["Model utilities<br/>[utils.py]"]
end

node_browser(("Web user"))

node_browser -->|"submits form"| node_flask
node_flask -->|"renders"| node_form
node_flask -->|"builds dataframe"| node_customdata
node_flask -->|"requests prediction"| node_predict
node_predict -->|"loads objects"| node_utils
node_utils -->|"reads artifacts"| node_artifacts
node_predict -->|"transforms with"| node_artifacts
node_predict -->|"renders result"| node_result
node_flask -->|"renders"| node_result
node_result -->|"shows score"| node_browser
node_ingestion -->|"reads"| node_rawdata
node_ingestion -->|"writes splits"| node_splits
node_ingestion -->|"invokes"| node_transform
node_transform -->|"reads"| node_splits
node_transform -->|"saves preprocessor"| node_artifacts
node_ingestion -->|"invokes"| node_trainer
node_trainer -->|"evaluates models"| node_utils
node_trainer -->|"saves model"| node_artifacts
node_trainpipe -->|"reads"| node_rawcsv
node_trainpipe -->|"saves objects"| node_utils
node_trainpipe -->|"writes artifacts"| node_artifacts

click node_flask "https://github.com/manoj914822/mlproject/blob/main/app.py"
click node_form "https://github.com/manoj914822/mlproject/blob/main/templates/index.html"
click node_result "https://github.com/manoj914822/mlproject/blob/main/templates/home.html"
click node_customdata "https://github.com/manoj914822/mlproject/blob/main/src/pipeline/predict_pipeline.py"
click node_predict "https://github.com/manoj914822/mlproject/blob/main/src/pipeline/predict_pipeline.py"
click node_ingestion "https://github.com/manoj914822/mlproject/blob/main/src/components/data_ingestion.py"
click node_rawdata "https://github.com/manoj914822/mlproject/blob/main/notepad/data/StudentsPerformance.csv"
click node_splits "https://github.com/manoj914822/mlproject/blob/main/artifacts/train.csv"
click node_transform "https://github.com/manoj914822/mlproject/blob/main/src/components/data_transformation.py"
click node_trainer "https://github.com/manoj914822/mlproject/blob/main/src/components/model_trainer.py"
click node_trainpipe "https://github.com/manoj914822/mlproject/blob/main/src/pipeline/train_pipeline.py"
click node_rawcsv "https://github.com/manoj914822/mlproject/blob/main/artifacts/data.csv"
click node_artifacts "https://github.com/manoj914822/mlproject/tree/main/artifacts"
click node_utils "https://github.com/manoj914822/mlproject/blob/main/src/utils.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_form,node_result,node_customdata,node_predict,node_browser toneBlue
class node_ingestion,node_rawdata,node_splits,node_transform,node_trainer,node_trainpipe,node_rawcsv toneAmber
class node_artifacts,node_utils toneMint
```

## Components

### Prediction web app

- [Flask routes](https://github.com/manoj914822/mlproject/blob/main/app.py): `app.py`
- [Input form](https://github.com/manoj914822/mlproject/blob/main/templates/index.html): `templates/index.html`
- [Result page](https://github.com/manoj914822/mlproject/blob/main/templates/home.html): `templates/home.html`
- [Form dataframe](https://github.com/manoj914822/mlproject/blob/main/src/pipeline/predict_pipeline.py): `src/pipeline/predict_pipeline.py`
- [Prediction pipeline](https://github.com/manoj914822/mlproject/blob/main/src/pipeline/predict_pipeline.py): `src/pipeline/predict_pipeline.py`

### Model training

- [Data ingestion](https://github.com/manoj914822/mlproject/blob/main/src/components/data_ingestion.py): `src/components/data_ingestion.py`
- [Student dataset](https://github.com/manoj914822/mlproject/blob/main/notepad/data/StudentsPerformance.csv): `notepad/data/StudentsPerformance.csv`
- [Train/test splits](https://github.com/manoj914822/mlproject/blob/main/artifacts/train.csv): `artifacts/train.csv`
- [Feature transformation](https://github.com/manoj914822/mlproject/blob/main/src/components/data_transformation.py): `src/components/data_transformation.py`
- [Model selection](https://github.com/manoj914822/mlproject/blob/main/src/components/model_trainer.py): `src/components/model_trainer.py`
- [Standalone training](https://github.com/manoj914822/mlproject/blob/main/src/pipeline/train_pipeline.py): `src/pipeline/train_pipeline.py`
- [Training CSV](https://github.com/manoj914822/mlproject/blob/main/artifacts/data.csv): `artifacts/data.csv`

### Artifacts and utilities

- [Model artifacts](https://github.com/manoj914822/mlproject/tree/main/artifacts): `artifacts`
- [Model utilities](https://github.com/manoj914822/mlproject/blob/main/src/utils.py): `src/utils.py`

### Other components

- **Web user**

## Connections

- Web user → Flask routes: submits form
- Flask routes → Input form: renders
- Flask routes → Form dataframe: builds dataframe
- Flask routes → Prediction pipeline: requests prediction
- Prediction pipeline → Model utilities: loads objects
- Model utilities → Model artifacts: reads artifacts
- Prediction pipeline → Model artifacts: transforms with
- Prediction pipeline → Result page: renders result
- Flask routes → Result page: renders
- Result page → Web user: shows score
- Data ingestion → Student dataset: reads
- Data ingestion → Train/test splits: writes splits
- Data ingestion → Feature transformation: invokes
- Feature transformation → Train/test splits: reads
- Feature transformation → Model artifacts: saves preprocessor
- Data ingestion → Model selection: invokes
- Model selection → Model utilities: evaluates models
- Model selection → Model artifacts: saves model
- Standalone training → Training CSV: reads
- Standalone training → Model utilities: saves objects
- Standalone training → Model artifacts: writes artifacts
