# yashpandey474/salary-prediction-using-machine-learning architecture

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

- Interactive diagram: https://gitdiagram.com/yashpandey474/salary-prediction-using-machine-learning
- Repository: https://github.com/yashpandey474/salary-prediction-using-machine-learning

## Overview

##### Project type and purpose
- This is a full-stack machine-learning web application for predicting developer salaries from survey inputs.
- It comprises a Streamlit front end (Python Files/app.py), a prediction engine (predictor.py + model_final.py), and pre-trained model artifacts (Model/*.pkl).  Notebooks illustrate the model development pipeline and the Datasets folder contains raw data used during training.

##### File structure
- Top-level folders
- Datasets: raw CSV and survey PDF used for feature engineering and training
- Notebooks: Jupyter notebooks for experimentation and model iteration
- Model: serialized model objects (model.pkl etc.) and a test C file (test.c)
- Python Files: application entry point (app.py), model runner (model_final.py), and helper (predictor.py)
- Configuration files
- requirements.txt: lists Streamlit, pandas, scikit-learn, etc.
- README.md: basic usage instructions
- Presentation Images & GUI Images: static assets shown in slides or in the UI

##### README for additional insights
- The app runs via `streamlit run app.py`
- Users choose input values via Streamlit widgets, then click “Predict Salary”
- No external APIs or databases—everything runs locally

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Online Serving
    subgraph "Online Serving"
        Browser["User's Web Browser"]:::frontend
        StreamlitServer["Streamlit Server (app.py)"]:::app
        Predictor["Prediction Orchestration (predictor.py)"]:::app
        ModelInference["Model Loading & Inference (model_final.py)"]:::app
        subgraph "Model Artifacts"
            direction TB
            Model1[(model.pkl)]:::model
            Model2[(model_2.pkl)]:::model
            Model3[(model_3.pkl)]:::model
        end
    end

    Browser -->|"widget events"| StreamlitServer
    StreamlitServer -->|"input payload"| Predictor
    Predictor -->|"feature vector"| ModelInference
    ModelInference -->|"loads model"| Model1
    ModelInference -->|"loads model"| Model2
    ModelInference -->|"loads model"| Model3
    ModelInference -->|"salary value"| StreamlitServer
    StreamlitServer -->|"display result"| Browser

    %% Offline Training Pipeline
    subgraph "Offline Training Pipeline"
        subgraph "Raw Data (Datasets)"
            direction TB
            DS1(("Updated Dataset.csv")):::data
            DS2(("so_survey_2023.pdf")):::data
            DS3(("valcnt.txt")):::data
            DS4(("README_2023.txt")):::data
        end
        subgraph "Model Development Notebooks"
            direction TB
            NB1["Salary_Prediction_Model.ipynb"]:::data
            NB2["Salary_prediction.ipynb"]:::data
            NB3["Salary_Preediction_Filtering.ipynb"]:::data
            NB4["Model_2.ipynb"]:::data
            NB5["Model_Final.ipynb"]:::data
            NB6["Untitled.ipynb"]:::data
        end
        DS1 --> NB1
        DS1 --> NB2
        DS1 --> NB3
        DS1 --> NB4
        DS1 --> NB5
        DS2 --> NB1
        NB1 -->|"training"| Model1
        NB2 -->|"training"| Model2
        NB4 -->|"training"| Model3
    end

    %% Static Assets & Docs
    GUIImages["GUI Images"]:::assets
    PresentationImages["Presentation Images"]:::assets
    subgraph "Configuration & Documentation"
        Req["requirements.txt"]:::docs
        Readme["README.md"]:::docs
    end

    %% Click Events
    click StreamlitServer "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Python Files/app.py"
    click Predictor "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Python Files/predictor.py"
    click ModelInference "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Python Files/model_final.py"
    click Model1 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Model/model.pkl"
    click Model2 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Model/model_2.pkl"
    click Model3 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Model/model_3.pkl"
    click DS1 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Datasets/Updated Dataset.csv"
    click DS2 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Datasets/so_survey_2023.pdf"
    click DS3 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Datasets/valcnt.txt"
    click DS4 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Datasets/README_2023.txt"
    click NB1 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Notebooks/Salary_Prediction_Model.ipynb"
    click NB2 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Notebooks/Salary_prediction.ipynb"
    click NB3 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Notebooks/Salary_Preediction_Filtering.ipynb"
    click NB4 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Notebooks/Model_2.ipynb"
    click NB5 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Notebooks/Model_Final.ipynb"
    click NB6 "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/Notebooks/Untitled.ipynb"
    click GUIImages "https://github.com/yashpandey474/salary-prediction-using-machine-learning/tree/main/GUI Images/"
    click PresentationImages "https://github.com/yashpandey474/salary-prediction-using-machine-learning/tree/main/Presentation Images/"
    click Req "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/requirements.txt"
    click Readme "https://github.com/yashpandey474/salary-prediction-using-machine-learning/blob/main/README.md"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef app fill:#90EE90,stroke:#000,stroke-width:1px
    classDef model fill:#FFA500,stroke:#000,stroke-width:1px
    classDef data fill:#D3D3D3,stroke:#000,stroke-width:1px
    classDef assets fill:#DDA0DD,stroke:#000,stroke-width:1px
    classDef docs fill:#F5DEB3,stroke:#000,stroke-width:1px
```
