# muhil-amuthan/food-delivery-time-prediction architecture

> Architecture diagram of the GitHub repository muhil-amuthan/food-delivery-time-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/muhil-amuthan/food-delivery-time-prediction
- Repository: https://github.com/muhil-amuthan/food-delivery-time-prediction

## Overview

This repository is a food-delivery-time prediction project. Its main workflow is to load and clean the delivery dataset, encode features, compare regression models, and save the selected model and encoders; a Streamlit interface then accepts delivery details and displays a prediction. The training script also performs exploratory analysis. The dataset and serialized artifacts are shown as files; their contents were not sampled.

Main entry points: [`Food_Delivery_Prediction.py`](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Prediction.py) (Clean and encode), [`app.py`](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/app.py) (Input interface), [`delivery_model.pkl`](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/delivery_model.pkl) (Saved model), [`encoders.pkl`](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/encoders.pkl) (Saved encoders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Training and analysis"]
  node_dataset["Delivery dataset"]
  node_cleaning["Clean and encode"]
  node_eda["Explore data"]
  node_modeling["Train regressors"]
  node_evaluation["Compare models"]
  node_model_file["Saved model<br/>[delivery_model.pkl]"]
  node_encoder_file["Saved encoders<br/>[encoders.pkl]"]
end

subgraph group_serving["Prediction app"]
  node_interface["Input interface<br/>[app.py]"]
  node_inference["Encode and predict<br/>[app.py]"]
  node_result["Estimated time<br/>[app.py]"]
end

node_user(("User"))

node_cleaning -->|"reads"| node_dataset
node_cleaning -->|"prepares data for"| node_eda
node_cleaning -->|"provides features to"| node_modeling
node_modeling -->|"evaluated by"| node_evaluation
node_evaluation -->|"saves selected model"| node_model_file
node_cleaning -->|"saves encoders"| node_encoder_file
node_user -->|"enters details"| node_interface
node_interface -->|"loads"| node_model_file
node_interface -->|"loads"| node_encoder_file
node_interface -->|"submits inputs"| node_inference
node_inference -->|"displays prediction"| node_result

click node_dataset "https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Times.csv"
click node_cleaning "https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Prediction.py"
click node_eda "https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Prediction.py"
click node_modeling "https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Prediction.py"
click node_evaluation "https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Prediction.py"
click node_model_file "https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/delivery_model.pkl"
click node_encoder_file "https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/encoders.pkl"
click node_interface "https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/app.py"
click node_inference "https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/app.py"
click node_result "https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/app.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_dataset,node_cleaning,node_eda,node_modeling,node_evaluation,node_model_file,node_encoder_file,node_user toneBlue
class node_interface,node_inference,node_result toneAmber
```

## Components

### Training and analysis

- [Delivery dataset](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Times.csv): `Food_Delivery_Times.csv`
- [Clean and encode](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Prediction.py): `Food_Delivery_Prediction.py`
- [Explore data](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Prediction.py): `Food_Delivery_Prediction.py`
- [Train regressors](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Prediction.py): `Food_Delivery_Prediction.py`
- [Compare models](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/Food_Delivery_Prediction.py): `Food_Delivery_Prediction.py`
- [Saved model](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/delivery_model.pkl): `delivery_model.pkl`
- [Saved encoders](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/encoders.pkl): `encoders.pkl`

### Prediction app

- [Input interface](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/app.py): `app.py`
- [Encode and predict](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/app.py): `app.py`
- [Estimated time](https://github.com/muhil-amuthan/food-delivery-time-prediction/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- Clean and encode → Delivery dataset: reads (evidence: `Food_Delivery_Prediction.py`)
- Clean and encode → Explore data: prepares data for (evidence: `Food_Delivery_Prediction.py`)
- Clean and encode → Train regressors: provides features to (evidence: `Food_Delivery_Prediction.py`)
- Train regressors → Compare models: evaluated by (evidence: `Food_Delivery_Prediction.py`)
- Compare models → Saved model: saves selected model (evidence: `Food_Delivery_Prediction.py`)
- Clean and encode → Saved encoders: saves encoders (evidence: `Food_Delivery_Prediction.py`)
- User → Input interface: enters details (evidence: `app.py`)
- Input interface → Saved model: loads (evidence: `app.py`)
- Input interface → Saved encoders: loads (evidence: `app.py`)
- Input interface → Encode and predict: submits inputs (evidence: `app.py`)
- Encode and predict → Estimated time: displays prediction (evidence: `app.py`)
