The Gradio Piece

I’m assuming that you’re already somewhat familiar with the Gradio library (https://github.com/gradio-app/gradio). If not, this MNIST tutorial is a good place to get started. The quick overview is: Gradio is a Python library that lets you create UIs around your machine learning model by specifying 3 things: a Python function, input component, and an output component.

Step 1: Create your Gradio app

We’ll start with a script that creates a drag-and-drop image interface around the Inception model. Create a brand new directory, and copy-paste the code below into a python file that we’ll call app.py:

What’s happening in this script is that we’re loading the Inception Net image classifier, using Tensorflow Keras. Since this is an image classification model, we will use the Image input interface. We’ll output a dictionary of labels and their corresponding confidence scores with the Label output interface. (To deploy your own model, swap this out with your own code).

#heroku #machine-learning #data-science #user-interface #artificial-intelligence

How to Deploy a Machine Learning UI on Heroku in 5 Steps
3.75 GEEK