# sayamalt/weather-prediction-using-machine-learning architecture

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

- Interactive diagram: https://gitdiagram.com/sayamalt/weather-prediction-using-machine-learning
- Repository: https://github.com/sayamalt/weather-prediction-using-machine-learning

## Overview

This is a small Flask weather-prediction app: a user submits weather measurements, the app scales them, predicts a weather class, and renders the decoded result. The sampled app source establishes this runtime flow; the notebooks and dataset are present, but their contents were not inspected, so no training or deployment workflow is inferred.

Main entry points: [`app.py`](https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/app.py) (Flask app), [`templates/index.html`](https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/templates/index.html) (Prediction page), [`scaler.pkl`](https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/scaler.pkl) (Feature scaler), [`model.pkl`](https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/model.pkl) (Weather model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Web interface"]
  node_page["Prediction page<br/>[index.html]"]
end

subgraph group_runtime["Prediction runtime"]
  node_app["Flask app<br/>[app.py]"]
end

subgraph group_artifacts["Model artifacts"]
  node_scaler["Feature scaler<br/>[scaler.pkl]"]
  node_model["Weather model<br/>[model.pkl]"]
  node_encoder["Label encoder<br/>[label_encoder.pkl]"]
end

node_user(("User"))

node_user -->|"requests page"| node_app
node_app -->|"renders"| node_page
node_page -->|"presents form"| node_user
node_user -->|"submits measurements"| node_app
node_app -->|"transforms features"| node_scaler
node_scaler -->|"returns scaled data"| node_app
node_app -->|"predicts class"| node_model
node_model -->|"returns prediction"| node_app
node_app -->|"loads classes"| node_encoder
node_app -->|"renders prediction"| node_page
node_app -->|"loads artifact"| node_scaler
node_app -->|"loads artifact"| node_model

click node_app "https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/app.py"
click node_page "https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/templates/index.html"
click node_scaler "https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/scaler.pkl"
click node_model "https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/model.pkl"
click node_encoder "https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/label_encoder.pkl"

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_page,node_user toneBlue
class node_app toneAmber
class node_scaler,node_model,node_encoder toneMint
```

## Components

### Web interface

- [Prediction page](https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/templates/index.html): `templates/index.html`

### Prediction runtime

- [Flask app](https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/app.py): `app.py`

### Model artifacts

- [Feature scaler](https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/scaler.pkl): `scaler.pkl`
- [Weather model](https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/model.pkl): `model.pkl`
- [Label encoder](https://github.com/sayamalt/weather-prediction-using-machine-learning/blob/main/label_encoder.pkl): `label_encoder.pkl`

### Other components

- **User**

## Connections

- User → Flask app: requests page
- Flask app → Prediction page: renders
- Prediction page → User: presents form
- User → Flask app: submits measurements
- Flask app → Feature scaler: transforms features
- Feature scaler → Flask app: returns scaled data
- Flask app → Weather model: predicts class
- Weather model → Flask app: returns prediction
- Flask app → Label encoder: loads classes
- Flask app → Prediction page: renders prediction
- Flask app → Feature scaler: loads artifact
- Flask app → Weather model: loads artifact
