Skip to content

rnrahate/Flight-Price-Prediction-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✈️ Flight Price Prediction Model

This project is a flight price prediction model that predicts the price of a flight based on various features like airline, source, destination, date, and duration. The model is deployed as a web application using Streamlit.

✨ Features

  • Flight Price Prediction: Predicts the price of a flight with high accuracy.
  • Interactive UI: A user-friendly web interface to interact with the model.
  • Data Visualization: Visualizes the flight route and price comparisons.
  • Real-time Predictions: Get instant flight price predictions.

📸 App Preview

App Screenshot 1 App Screenshot 2

App Link (Deployed on Streamlit)

https://rnrahate-flight-price-prediction-model-app-momdgy.streamlit.app/

🛠️ Tools Used

Python Streamlit Jupyter Scikit-learn Pandas Plotly

📦 Installation

  1. Clone the repository:

    git clone https://github.com/your-username/Flight-Price-Prediction-Model.git
    cd Flight-Price-Prediction-Model
  2. Create a virtual environment:

    python -m venv venv
    venv\Scripts\activate
  3. Install the dependencies:

    pip install -r requirements.txt

    (You will need to create a requirements.txt file)

🏃‍♀️ Usage

  1. Run the Streamlit app:

    streamlit run app.py
  2. Open your browser and navigate to http://localhost:8501.

🧠 Model Training

The machine learning model was trained using a Random Forest Regressor on a dataset of flight prices. The notebook flight_price.ipynb contains the complete code for data preprocessing, model training, and evaluation.

The following models and data files are used in the application:

  • flight_rf_model.pkl: The trained Random Forest model.
  • flight_scaler.pkl: The scaler used to scale the numerical features.
  • flight_encoder.pkl: The encoder used to encode the categorical features.
  • flight_feature_names.pkl: The list of feature names used in the model.
  • flight_summary.csv: A summary of the flight data.

📂 Files and Directories

.
├── app.py                  # The Streamlit web application
├── flight_price.ipynb      # Jupyter notebook for model training
├── flight_price.xlsx       # The raw dataset
├── flight_summary.csv      # A summary of the flight data
├── models/
│   ├── flight_encoder.pkl
│   ├── flight_feature_names.pkl
│   ├── flight_rf_model.pkl
│   └── flight_scaler.pkl
├── README.md               # This file
└── venv/                     # Virtual environment

🙏 Acknowledgements

HAPPY CODING!

About

End-to-end flight price prediction system using machine learning, including data preprocessing, model training, and deployment with Streamlit for interactive price predictions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors