Don’t want to deal with Docker, Flask, and web hosting? Try this instead

Several years ago, when I built my first machine learning model to classify handwritten digits, I immediately wanted to show it off to my friends and my siblings so that they could see what I had built. I remember searching “how to deploy a machine learning model” and becoming frustrated with all of the steps required, from containerization with Docker to purchasing an Amazon web server to host the model. What I thought would be a fast process took me several days of development and a lot of debugging.

Now, many years later into my PhD, I’ve trained hundreds of…


GradioHosted is a place for ML practitioners and developers to share their pretrained models with anyone

If you’ve built a machine learning model that works well, you probably want to share it so that others can try it out. The Gradio library makes it really easy to create a shareable GUI & public link for your model, as long as the model is running on your local computer. But what if you need a long-term hosted solution? That’s what GradioHosted is for!

In this tutorial, I’m going to show you, step by step, how to create and deploy your machine learning model app on GradioHosted.

GradioHosted lets anyone use your model interactively at any time— even…


A step-by-step guide on finding and understanding problems in your machine learning model — and fixing them!

Machine learning models can be used to build cool applications and demos. But it’s still a challenge to deploy machine learning systems reliably in the real world, because they often fail in unexpected ways when unexpected data comes around.

For example, classifying digits in the MNIST handwriting dataset is one of the most basic machine learning tasks, often used as an example of a “solved problem” in introductory machine learning courses. Yet, even a machine learning classifier that achieves 99% accuracy can make incorrect predictions when digits are rotated in unusual ways:

Image for post
Image for post
A convolutional neural network trained on the MNIST dataset to 99%+ accuracy nevertheless predicts “1” when it encounters an unusually rotated “2” from the test set (try on www.gradio.app)

The aim of this blog post is to…


You’ve built a demo for your machine learning model with Gradio. Now, deploy it with a permanent link on an AWS instance

If you’ve built a machine learning model that works well, you might want to demo it, so that others can try it out. The Gradio library makes it really easy to create a shareable GUI for your model, as long as the model is running on your local computer. But what if you need a long-term hosted solution?

In this tutorial, I’m going to show you, step by step, how to create and deploy your machine learning model and UI on an AWS EC2 instance. …


Why pretrained machine learning models are often unusable and irreproducible — and what we can do about it

Introduction

A useful approach to designing software is through contracts. For every function in your codebase, you start by writing its contract: clearly specifying what inputs are expected and valid for that function (the precondition), and what the function will do (the postcondition) when provided an appropriate input. This is often explicitly stated in the docstring of a function. Consider this example from the math module in Python (implemented in C):

The contract in the docstring has two parts:

  • Precondition: input should be an integer between 2⁶² and 2⁶⁴
  • Postcondition: output is an integer within 1 of the square root…


Business use cases for Gradio

Gradio is being used by some of the world’s leading companies and machine learning teams, from Stanford’s Human-Centered AI to Cisco AI. How do they use it, and how can Gradio accelerate your machine learning (ML) team’s workflow? In this tutorial, I give a brief introduction to Gradio and outline 3 business use cases where Gradio allows you to do weeks of engineering work in under an hour.

Intro to Gradio

Gradio is an open-source Python package that automatically creates fully-functioning web apps with GUIs around ML models, in just 3 lines of code. With Gradio’s interfaces, non-ML users can…


Gradio lets you build a UI for your machine learning model. Heroku lets you host it. Here’s how to use them together.

In this tutorial, I’m going to show you, step by step, how to create and deploy your machine learning model and UI on Heroku. I’ll use this drag-and-drop image interface that I created for the Inception Net model as an example:

Image for post
Image for post

You can try out the GUI at: https://arcane-tundra-83748.herokuapp.com/ (might take a minute for the dyno to start up)

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. …


Have you ever trained a machine learning model that you’ve wanted to share with the world? Maybe set up a simple website where you (and your users) could try putting in their own inputs and seeing the models’ predictions? It’s easier than you might think!

In this tutorial, I’m going to show you how to train a machine learning model to recognize digits using the Tensorflow library, and then create a web-based GUI to show predictions from that model. You (or your users) will be able to draw arbitrary digits into a browser, and see real-time predictions, just like below…


If you’re thinking about going for a PhD, there are lots of excellent guides I would recommend reading. However, most guides I’ve read focus on the high-level picture of pursuing a doctorate, not how it feels day-to-day to be sitting in your lab, doing research.

When I started my PhD at Stanford three years ago, I had no idea how much time I would be banging my head against a difficult problem and staring into a monitor with no apparent solution in sight. I also could not have realized how amazing it would feel when an unexpected epiphany hit me…

Abubakar Abid

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store