Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Deploying machine learning models with flask for beginners
Rating: 4.3 out of 5(144 ratings)
642 students

Deploying machine learning models with flask for beginners

How to deploy a machine learning model. How to create an API for machine learning. #machinelearning, #datascience
Created byDan We
Last updated 5/2023
English
English [Auto],

What you'll learn

  • You can create your own API endpoint for your machine learning models
  • You learn how to use flask
  • You know how to quickly deploy a userfriendly html page to make image classification predictions
  • You use transfer learning
  • You train your knowlege about keras
  • You will train your data science skills

Course content

2 sections18 lectures2h 31m total length
  • 1 Hello and welcome everyone1:32

    Learn to host neural networks on a server with the Flask framework, build a Flask app, and classify images via post requests and a user-friendly e-mail interface using transfer learning.

  • Downloadsection0:02
  • One important thing before you start0:24
  • 3 Quick Introduction to Flask - Hello world web server application8:12

    Install flask and dependencies with pip or conda, then build a simple flask app with a root route that returns hello world. Run the server on localhost:9000 to view it.

  • 4 Defining and training the model23:55

    Define a neural network using TensorFlow and Keras to predict miles per gallon from car attributes, train it with a train/test split, and deploy predictions on a Flask server.

  • 5 Evaluating and saving the trained model5:54

    Evaluate the trained model by predicting on the test data and computing the mean squared error, then save the model to an H5 file in a specified folder.

  • 6 Testing the model availability and make a first prediction7:01

    Load the pre-trained model in a notebook, import dependencies, and set the proper path, then create a sample input and generate the first prediction.

  • 7 How to define the boundaries of our input data3:00

    Define input data boundaries by extracting minimum and maximum values for each feature, such as cylinders, displacement, horsepower, weight, acceleration, gear, and origin, in the Flask app.

  • 8 Create our flask application - get started5:57

    Learn to create a flask application for deploying a machine learning model, load the model, define input expectations and endpoints, and test with postman.

  • 9 Creating the flask endpoint and ensure data quality checks17:15

    Create a flask endpoint to serve a machine learning model, receive json input via post, and validate fields like cylinders, displacement, horsepower, weight, and origin to return predictions or errors.

  • 10 Testing our API endpoint - lets get some predictions14:38

    Test a flask api endpoint to obtain mpg predictions by posting json data (vehicle features) to /api on localhost:5000, using requests or postman.

  • 11 Introduction to the Image Classification Part10:06

    Explore building an image classification API with Flask by loading a pre-trained MobileNet, performing transfer learning, and exposing an endpoint to upload an image and return a prediction.

  • 12 Flask Application - An enpoint for our Image classification API19:11

    Create a Flask web app with a pre-trained MobileNet ImageNet model, expose an API endpoint for image uploads, perform preprocessing and decode predictions, and render results in templates.

  • 13 The HTML Template explained6:41

    Discover how to render an html email template in a Flask app using render_template, with a templates and static css setup for styling and a prediction workflow.

  • 14 Predicting Images on our hosted Flask Web application3:09

    Predict images on a hosted flask web application by uploading an image to an endpoint and viewing model predictions, such as identifying a giant panda with high confidence.

  • 15 Congratulations and final words of wisdom0:49

    Congratulations on completing the course; you built a solid foundation in machine learning with the flask framework, tested API endpoints, and created a user frontend to deliver image IDs.

Requirements

  • Basic knowlege of python
  • Basic knowledge about neural networks
  • The flask part and deployment is for beginners. We start from scratch and quickly acquire the skills together
  • Your personal interest in the topic and a hands on mentality
  • This course is hands on - instead of theory we implement the code and I explain what we do and why we do it

Description

About this course

Let's dive into data science with python and learn how we can create our own API (Application Programming Interface) where we can send data to and let our model return a prediction.

This course is a practical hands on course where we learn to deploy our trained machine learning models aka neural networks with the flask web framework.

This is a beginners class. You don't need any pre-knowlege about flask but you should know about neural networks and python. We will learn and code step by step together and I will explain what we do along the way.

Besides machine learning apis we will also use transferlearning to use an advanced neural network and use a userfriendly HTML template to give the enduser a visual appealing interface for our application. The user can upload an image and our model will return an image classification prediction

All the resources will be provided and you can download all the used tools completely for free.

Sounds interesting? I hope so! Let's dive in and do this together. Let's acquire new skills and create new opportunities for us.


In General

Why datascience and machine learning? Well...

In the world of today and especially tomorrow machine learning and artificial intelligence will be the driving force of the economy. Data science  No matter who you are, an entrepreneur or an employee, and in which industry you are working in, machine learning (especially deep learning neural networks) will be on your agenda.


from me personal:

"From my personal experience I can tell you that companies will actively searching for you if you aquire some skills in the data science field. Diving into this topic can not only immensly improve your career opportunities but also your job satisfaction!"

It's time to get your hands dirty and dive into one of the hottest topics on this planet.

Who this course is for:

  • beginners to intermediate students in neural networks and machine learning who already know the basics
  • students who are eager to learn and dive into one of the hottest topics currently out there
  • you want to learn how to create an api endpoint for your neural network using flask
  • you want to learn about creating a neural network web service using flask