parent
af5a93e471
commit
e39fecc70e
@ -0,0 +1 @@
|
||||
Subproject commit 016d5681d8ee4e9945809586d23433b897b1cbe1
|
@ -1,16 +0,0 @@
|
||||
# Build an API
|
||||
|
||||
In this lesson, you will train a Linear Regression model and a Classification model on a dataset that's out of this world: UFO Sightings over the past century, sourced from [NUFORC's database](https://www.nuforc.org).
|
||||
## [Pre-lecture quiz](link-to-quiz-app)
|
||||
|
||||
✅ Knowledge Check - use this moment to stretch students' knowledge with open questions
|
||||
|
||||
🚀 Challenge: Add a challenge for students to work on collaboratively in class to enhance the project
|
||||
|
||||
## [Post-lecture quiz](link-to-quiz-app)
|
||||
|
||||
## Review & Self Study
|
||||
|
||||
**Assignment**: [Assignment Name](assignment.md)
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
# Build an API to use your saved model
|
||||
|
||||
In this section of the curriculum, you will be introduced to an applied ML topic: how to save your Scikit-Learn model as a file that can be used to make predictions by means of an API. An API (Application Programming Interface) is software that forms the handshake between your backend (in our case, the ML model) and a frontend of your choice. In this lesson, let's build an API to query two different types of models.
|
||||
|
||||
## Topics
|
||||
|
||||
1. [Build an API](1-API/README.md)
|
||||
|
||||
## Credits
|
||||
|
||||
"Build an API" was written with ♥️ by [Jen Looper](https://twitter.com/jenlooper). The dataset is sourced from [Kaggle](https://www.kaggle.com/NUFORC/ufo-sightings).
|
@ -0,0 +1,30 @@
|
||||
# Build a Web App to use a ML Model
|
||||
|
||||
In this lesson, you will train a Linear Regression model and a Classification model on a dataset that's out of this world: UFO Sightings over the past century, sourced from [NUFORC's database](https://www.nuforc.org). We will continue our use of notebooks to clean data and train our model, but you can take the process one step further by exploring using a model 'in the wild', so to speak: in a web app. To do this, you need to build a web app using Flask.
|
||||
|
||||
There are several ways to build web apps to consume machine learning models. Your web architecture may influence the way your model is trained. Imagine that you are working in a business where the data science group has trained a model that they want you to use in an app. There are many questions you need to ask: Is it a web app, or a mobile app? Where will the model reside, in the cloud or locally? Does the app have to work offline? And what technology was used to train the model, because that may influence the tooling you need to use?
|
||||
|
||||
If you are training a model using TensorFlow, for example, that ecosystem provides the ability to convert a TensorFlow model for use in a web app by using [TensorFlow.js](https://www.tensorflow.org/js/). If you are building a mobile app or need to use the model in an IoT context, you could use [TensorFlow Lite](https://www.tensorflow.org/lite/) and use the model in an Android or iOS app.
|
||||
|
||||
If you are building a model using [PyTorch](https://pytorch.org/), you have the option to export it in [ONNX](https://onnx.ai/) (Open Neural Network Exchange) format for use in JavaScript web apps that can use [onnx.js](https://github.com/Microsoft/onnxjs). This option will be explored in a future lesson.
|
||||
|
||||
If you are using an ML SaaS (Software as a Service) system such as [Lobe.ai](https://lobe.ai/) or [Azure Custom Vision](https://azure.microsoft.com/en-us/services/cognitive-services/custom-vision-service/) to train a model, this type of software provides ways to export the model for many platforms, including building a bespoke API to be queried in the cloud by your online application.
|
||||
|
||||
You also have the opportunity to build an entire Flask web app that would be able to train the model itself in a web browser. This can also be done using TensorFlow.js in a JavaScript context. For our purposes, since we have been working with notebooks, let's explore the steps you need to take to export a trained model to a format readable by a Python-built web app.
|
||||
|
||||
## Tools
|
||||
|
||||
For this task, you need two tools: Flask and Pickle, both of which run on Python.
|
||||
## [Pre-lecture quiz](link-to-quiz-app)
|
||||
|
||||
✅ Knowledge Check - use this moment to stretch students' knowledge with open questions
|
||||
|
||||
🚀 Challenge: Add a challenge for students to work on collaboratively in class to enhance the project
|
||||
|
||||
## [Post-lecture quiz](link-to-quiz-app)
|
||||
|
||||
## Review & Self Study
|
||||
|
||||
**Assignment**: [Assignment Name](assignment.md)
|
||||
|
||||
|
Can't render this file because it is too large.
|
After Width: | Height: | Size: 407 KiB |
@ -0,0 +1,11 @@
|
||||
# Build a Web App to use your ML Model
|
||||
|
||||
In this section of the curriculum, you will be introduced to an applied ML topic: how to save your Scikit-Learn model as a file that can be used to make predictions within a web application. Once the model is saved, you'll learn how to use it in a web app built in Flask. You'll first create a model using some data that's all about UFO sightings! Then, you'll build a web app that will allow you to input a number of seconds with a latitude and a longitude value to predict which country reported seeing a UFO.
|
||||
|
||||
## Lessons
|
||||
|
||||
1. [Build a Web App](1-Web-App/README.md)
|
||||
|
||||
## Credits
|
||||
|
||||
"Build a Web App" was written with ♥️ by [Jen Looper](https://twitter.com/jenlooper). The dataset is sourced from [Kaggle](https://www.kaggle.com/NUFORC/ufo-sightings). The web app architecture was suggested in part by [this article](https://towardsdatascience.com/how-to-easily-deploy-machine-learning-models-using-flask-b95af8fe34d4) and [this repo](https://github.com/abhinavsagar/machine-learning-deployment) by Abhinav Sagar.
|
Loading…
Reference in new issue