Skip to content

realshubhamraut/Flight-Airfare-Prediction-on-Azure-with-WebUI

Repository files navigation

Flight-Airfare-Prediction-on-Azure-with-WebUI ✈️


Flight-Airfare-Prediction-on-Azure-with-WebUI is an end‑to‑end solution that predicts flight airfares using machine learning while offering an interactive web interface. The system includes advanced data exploration and feature engineering, multiple model building, and REST API endpoints via FastAPI. An intuitive Streamlit application allows users to input flight details and view predictions in real time. The entire solution is containerized with Docker and deployed on Azure for scalable, production‑grade operations.

VIEW LIVE

Access API

Technology Stack

  • Frontend & Visualization:
    Streamlit, Altair, PyDeck, Folium

  • API & Backend:
    FastAPI, Python (joblib, Pandas)

  • Machine Learning:
    Feature engineering and modeling in Jupyter Notebooks, model serialization with joblib

  • Containerization & Deployment:
    Docker, Azure Container Registry, Azure Machine Learning, Azure Web Apps

🌟 Features

  • End-to-End ML Pipeline:

    • Performed comprehensive EDA and feature engineering to prepare flight data.
    • Developed, validated, and selected multiple predictive models with high accuracy.
  • Real-Time Predictions via REST API:

    • Deployed a FastAPI service exposing endpoints (e.g., /predict) for sub‑500 ms response times.
    • Implements robust data pre‑processing and encoding for dynamic flight predictions.
  • Interactive User Interface:

    • Streamlit web app enables users to input flight details, view predictions, and explore dynamic visualizations such as calendar charts and 3D route maps.
    • Integrated interactive charts using Altair and spatial visualizations with Folium.
  • Cloud-Ready Deployment:

    • Containerized the application using Docker for consistency and scalability.
    • Deployed on Azure using Azure Container Registry, Azure ML for model management, and Azure Web Apps for global availability 24/7.

🛠️ Installation

  1. Clone the Repository:

    git clone https://github.com/realshubhamraut/Flight-Airfare-Prediction-on-Azure-with-WebUI
    cd Flight-Airfare-Prediction-on-Azure-with-WebUI
    
  2. Install Dependencies:

  • For local environment using pip:
    pip install -r requirements.txt

(Alternatively) Create a Conda environment using conda_dependencies.yml.

Configure Azure Resources:

  • Download your Azure ML workspace configuration file (e.g., config.json) and place it in the project root.

  • Ensure you have access to an Azure Subscription with resources like Container Registries, ML Workspaces, and Web Apps.

Build & Push the Docker Image:

docker build -t flight-fastapi-app .
docker tag flight-fastapi-app <ACR_LOGIN_SERVER>/flight-fastapi-app:latest
docker push <ACR_LOGIN_SERVER>/flight-fastapi-app:latest

Run the Local Web App:

To run the FastAPI service:

uvicorn fastapi_app:app --reload

Finally to launch the streamlit interface

streamlit run app.py