GithubHelp home page GithubHelp logo

deenuy / flask-ml-pipeline_gcp-tutorial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sohiniroych/flask-ml-pipeline_gcp-tutorial

0.0 0.0 0.0 236 KB

License: MIT License

Dockerfile 2.09% Python 22.34% CSS 61.82% HTML 13.75%

flask-ml-pipeline_gcp-tutorial's Introduction

Flask ML Model CD Pipeline Tutorial

The data set in this exercise is from the blog on Flask Tutorial at Build the first Flask Python web app framework. This codebase is based on the GCP Pipeline tutorial at ML Deployment on Cloud

ML Model Flask-Deployment

This project demonstrates how a Flask ML app can be deployed on Google Cloud Platform using Docker container and YAML files that are useful to build continuous deployment (CD) pipelines.

Prerequisites (requirements.txt)

  • Scikit Learn
  • Pandas
  • Numpy
  • Flask

Project Structure

All the application files are contained in the folder 'app_files'. The goal is to build an ML model using Decision Tree Classifier

  1. model.py - This contains code fot our Machine Learning model (Decision Tree model) to predict employee salaries absed on trainign data in '50_Startup.csv' file.
  2. app.py - This contains Flask APIs that receives employee details through GUI or API calls, computes the precited value based on our model and returns it.
  3. request.py - This uses requests module to call APIs already defined in app.py and dispalys the returned value.
  4. templates - This folder contains the HTML template to allow user to enter employee detail and displays the predicted employee salary.

Running the project

  1. Ensure that you are in the project home directory. Create the machine learning model by running below command -
python model.py

This would create a serialized version of our model into a file model.pkl

  1. Run app.py using below command to start Flask API
python app.py

The flask app will run on http://0.0.0.0:8080/ (localhost)

Deploying on Google Cloud

https://console.cloud.google.com/run?project=my-ml-project-303018

https://console.cloud.google.com/cloud-build/triggers?project=my-ml-project-303018

flask-ml-pipeline_gcp-tutorial's People

Contributors

sohiniroych avatar lightshifted 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.