gradio
TLDR
Run Gradio app
SYNOPSIS
gradio [file] [options]
DESCRIPTION
Gradio is a Python library for creating machine learning demos and web interfaces. It allows rapid prototyping of ML models with interactive UIs, supporting inputs like text, images, audio, and video.
Gradio interfaces can be shared via temporary public URLs, making it easy to demonstrate models to others. It's widely used in the Hugging Face ecosystem.
PARAMETERS
file
Python file with Gradio interface.--share
Create public shareable link.--server-port port
Port number (default 7860).--server-name host
Host address.--debug
Enable debug mode.--reload
Auto-reload on changes.
PYTHON EXAMPLE
def greet(name):
return f"Hello, {name}!"
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()
CAVEATS
Requires Python 3.7+. Share links expire after 72 hours. Large models need appropriate resources. WebSocket connections required for interactivity.
HISTORY
Gradio was created by Abubakar Abid and team, acquired by Hugging Face in 2022. It revolutionized ML demo creation by making interactive interfaces accessible to researchers without web development expertise.


