some edits to web app

pull/34/head
Jen Looper 3 years ago
parent af5a93e471
commit e39fecc70e

1
.vscode/deploy-ml vendored

@ -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).

@ -2,7 +2,7 @@
In this section of the curriculum you will learn about how to classify data using Machine Learning.
## Topics
## Lessons
1. [Visualize your Data and Prepare it for Use](1-Data/README.md)
2. [Build a Discriminative Model](2-Discriminative/README.md)

@ -9,7 +9,7 @@ Photo by <a href="https://unsplash.com/@marcelalaskoski?utm_source=unsplash&utm_
In this series of lessons, you will discover new ways to analyze data using Clustering techniques. Clustering is particularly useful when your dataset lacks labels. If it does have labels, then Classification techniques such as those you learned in previous lessons are more useful. But in cases where you are looking to group unlabelled data, clustering is a great way to discover patterns.
## Topics
## Lessons
1. [Introduction to Clustering with Data Visualizations](1-Visualize/README.md)
2. [K-Means Clustering](2-K-Means/README.md)

@ -2,7 +2,7 @@
In this section of the curriculum, you will be introduced to the base concepts underlying the field of machine learning, what is is, and learn about its history.
### Topics
### Lessons
1. [Introduction to Machine Learning](1-intro-to-ML/README.md)
1. [The History of Machine Learning](2-history-of-ML/README.md)

@ -2,7 +2,7 @@
In this section of the curriculum, you will be introduced to ...
## Topics
## Lessons
1. [Introduction to](1-intro-to/README.md)

@ -75,7 +75,7 @@ By ensuring that the content aligns with projects, the process is made more enga
| 12 | Introduction to Clustering | [Clustering](Clustering/README.md) | Clean, Prep, and Visualize your Data; Introduction to Clustering | [lesson](Clustering/1-Visualize/README.md) | |
| 13 | Exploring Nigerian Musical Tastes 🎧 | [Clustering](Clustering/README.md) | Explore the K-Means Clustering Method | [lesson](Clustering/2-K-Means/README.md) | |
| 14 | Exploring Nigerian Musical Tastes 🎧 | [Clustering](Clustering/README.md) | Explore Centroid models for Clustering | [lesson](Clustering/3-Centroid/README.md) | |
| 15 | An API Endpoint 🔌 | [API](API/README.md) | Build an API endpoint to query your trained models | [lesson](API/Api-Endpoint/README.md) | Jen |
| 15 | A Web App 🔌 | [Web App](Web-App/README.md) | Build a Web app to use your trained model | [lesson](Web-App/README.md) | Jen |
| 16 | Introduction to NLP | [Natural Language Processing](NLP/README.md) | tbd | [lesson]() | Stephen |
| 17 | Romantic Hotels of Europe ♥️ | [Natural Language Processing](NLP/README.md) | tbd | [lesson]() | Stephen |
| 18 | Romantic Hotels of Europe ♥️ | [Natural Language Processing](NLP/README.md) | tbd | [lesson]() | Stephen |

@ -2,7 +2,7 @@
In this section of the curriculum, you will be introduced to ...
## Topics
## Lessons
1. [Real-World Applications for ML](1-Applications/README.md)

@ -11,7 +11,7 @@ In North America, pumpkins are often carved into scary faces for Halloween. Let'
In this section, you will get set up to begin machine learning tasks, including configuring Visual Studio code to manage notebooks, the common environment for data scientists. You will discover Scikit-Learn, a library for machine learning, and you will build your first models, focusing on Regression models in this chapter.
### Topics
### Lessons
1. [Tools of the Trade](1-Tools/README.md)
2. [Managing Data](2-Data/README.md)

@ -2,7 +2,7 @@
In this section of the curriculum, you will be introduced to ...
## Topics
## Lessons
1. [Introduction to](1-intro-to/README.md)

@ -2,7 +2,7 @@
In this section of the curriculum, you will be introduced to ...
## Topics
## Lessons
1. [Introduction to](1-intro-to/README.md)

@ -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)

Binary file not shown.

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…
Cancel
Save