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.
- 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.
https://rnrahate-flight-price-prediction-model-app-momdgy.streamlit.app/
-
Clone the repository:
git clone https://github.com/your-username/Flight-Price-Prediction-Model.git cd Flight-Price-Prediction-Model -
Create a virtual environment:
python -m venv venv venv\Scripts\activate
-
Install the dependencies:
pip install -r requirements.txt
(You will need to create a
requirements.txtfile)
-
Run the Streamlit app:
streamlit run app.py
-
Open your browser and navigate to
http://localhost:8501.
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.
.
├── 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
HAPPY CODING!

