This project is designed to predict the price of travel packages based on various features and input data. It utilizes machine learning techniques to make accurate predictions.
Before you can run this project, ensure you have the necessary libraries and models installed:
- Python 3
- Flask
- numpy
- sentence_transformers
- joblib
- pandas
You will also need a pre-trained SentenceTransformer model for text embeddings. You can initialize it using:
model = SentenceTransformer('flax-sentence-embeddings/all_datasets_v4_MiniLM-L6')
The project loads the following pre-trained models from the ./model
directory:
- Linear Regression model (
lr_model.joblib
) - Principal Component Analysis (PCA) model (
pca.joblib
) - Scaler for data transformation (
scaler.joblib
)
The core function for making predictions is predict_price
, which takes input data and returns a price prediction.
To use this project, you can run it locally. The main Flask app provides a web interface for inputting travel package details and getting price predictions.
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8000)
The input form allows you to enter details about the travel package, such as package name, destination, itinerary, and more. You can also select various options like package type, travel month, and more.
This project provides a simple web interface for interacting with the prediction model. It's accessible by visiting the root URL ("/") in your web browser.
You can also make predictions via API by sending a POST request to the "/predict" endpoint with the necessary data. The prediction is returned in JSON format.
Feel free to customize and use this project for your own travel package price predictions.