GithubHelp home page GithubHelp logo

snozh5 / model-deployment-heroku Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 7.14 MB

Flight Fare Prediction Deployment using Flask in Heroku -https://flightticketprediction-d.herokuapp.com/

Jupyter Notebook 67.05% Python 11.36% HTML 21.58%
heroku python-3 flask-api

model-deployment-heroku's Introduction

Flight Fare Prediction deployment using Flask in Heroku

Problem Statement

The aim of this project is to predict the fares of the flights based on different factors available in the dataset. The flight ticket prices either increase or decrease depending on various factors like timing of the flights, destination, and duration of flights etc.

Description

  • AIM:- Airway is the fastest mean of travelling long distance destinations and it has become an integral part of our life. The flight ticket prices either increase or decrease depending on various factors like timing of the flight, destination and durations of the flight etc. So to get an idea of the ticket price beforehand will surely help in planning the trip and save some money on travelling expenses.
  • Approach:- Data Exploration, Data Cleaning, Feature Engineering, Model Building & Testing and Deployment.
  • Alorithm:- Random Forest Regressor is used to build the model also Lasso is used for feature selection.
  • Flowchart:-

Flowchart

Project Structure

In the deployment folder the project have got four major parts:-

  1. Flight_Fare_Prediction_Model - This file contains the code of our trained ML model to predict flight fare based on the data in excel file name 'Data_Train.xlsx'.
  2. app.py - This file contains the deployment codes and the API of Flask.
  3. templates - This folder contains the HTML template to allow user to enter flight detail and displays the predicted flight fare basically the webpage.
  4. requirement.txt - This files contains the all the required necessary packages used by the model during the training process and its very important file used by Heroku app.

Installation

First clone the repository then run the command to download:-

pip install -r requirements.txt

This will install all the required liberies used by the model.

Running the project

  1. Execute the file name Flight_Fare_Prediction_Model, its a Jupyter notebook where the machine learning model is being trained, this would create a serialized version of our model into a file model.pkl.

Please ensure that you are in the clonned directory.

  1. Run app.py file using Anaconda prompt to start Flask API using the command line python app.py. It will navigate to URL http://127.0.0.1:8000/ this is the local host.

After running the URL in brower the home page will be displayed like the one below: Home

Deployment in Heroku

For deploying in Heroku first we need to login to the platform. After that connect the GitHub account to Heroku. Then go to new section and create an app. After that go to deploy section and search for the repository in the search bar but ensure that Github account is connected.
Select the deployment depository and click on connect. After connections are made click on deploy, this will automatically install all the necessary files and run the model. After successful compilation URL will be generated. Heroku

App Deployment Link

Flight Fare Deployment -https://flightticketprediction-d.herokuapp.com/

model-deployment-heroku's People

Contributors

snozh5 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.