End to end project on life insurance price prediction
This project demonstrates how to deploy a machine learning model using Flask to create a simple web application for making predictions.
The project is organized as follows:
app.py
: The main Flask application that handles web requests and model predictions.model.py
: Contains functions for training and making predictions using a machine learning model.requirements.txt
: Contains all the required libraries.templates/
: Directory for HTML templates used in the web application.index.html
: The main HTML template for the web app's user interface.
Follow these steps to set up and run the project:
-
Clone the repository:
git clone <repository-url> cd ml-model-deployment-flask
-
Create a virtual environment (optional but recommended):
virtualenv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the Flask application:
python app.py
The web app will be accessible at
http://localhost:8080
.
-
Open your web browser and navigate to
http://localhost:8080
. -
Enter a values in the input field and click the "Predict" button.