Gradio is a free, open-source python library that helps machine learning researchers interact with and share their machine learning models with collaborators and clients with only a few lines of extra code.

With gradio, you can easily generate in-browser interfaces that enable you to enter various forms of input for your model and explore the behavior of your model immediately. Gradio also generates links that can be shared with collaborators and other audiences, so they can interact with the model without setting up any software or even having any background in machine learning or software at all!

Visit the Gradio GitHub >>

Gradio was developed by researchers at Stanford University and is under the Apache license.

image_detector.py
import gradio, tensorflow as tf
image_mdl = tf.keras.models.Sequential()
# ... define and train the model as you would normally
io = gradio.Interface(input=“imageupload", output=“label”, model_type=“keras”,model=image_mdl)
io.launch()
The code above produces produces an interface like this, in which you can upload an image and receive labelling as output. Click submit to get the prediction!
Input
Drop Image Here
- or -
Click to Upload
Output

Fast, easy setup

Using Gradio only requires adding a couple lines of code to your project. You can install Gradio from pip and deploy your model in seconds. Once launched, you can choose from a variety of interface types to interact with, iterate over, and improve your models.

More on Getting Stared >>

Present and share

Gradio present an interface that is intuitive to engineers and non-engineers alike, and thus a valuable tool in sharing insights from your models. When Gradio launches a model, it also creates a link you can share with colleagues that lets them interact with the model on your computer remotely from their own devices.

More on Sharing >>

Embed and go

Gradio can be embedded in Jupyter and Colab notebooks, in blogs and websites, and screenshotted for use in research papers. These features all help your models be more easily shared and consumed with a larger audience.