Repolode
gradio-app

gradio-app/gradio

Python package for quickly building and sharing web demos and UIs for machine learning models, APIs, or any Python function.

Open-source alternative to:Streamlit

Stars
43,817
Forks
3,638
Open issues
114
Last commit
4 hours ago

What is it?

Gradio is an open-source Python package that wraps a machine learning model, API, or any Python function in a web interface. A few lines of Python define the function and its input and output components, and the app runs locally in a browser or inside a notebook. No JavaScript, CSS, or web hosting knowledge is required.

For quick demos, the gr.Interface class takes a function plus lists of inputs and outputs. For more control over layout and data flow, gr.Blocks lets developers place components, chain functions, and update component properties based on user interaction. gr.ChatInterface builds chatbot UIs from a single function.

Setting share=True in launch() produces a public URL for the demo while computation keeps running on the local machine. The wider ecosystem includes Python and JavaScript clients for querying any Gradio app, and Hugging Face Spaces for hosting.

Key features

  • 01Wraps any Python function in a web UI with a few lines of code.
  • 02Provides more than 30 built-in components such as Textbox, Image, and HTML.
  • 03Offers gr.Blocks for custom layouts, chained events, and dynamic component updates.
  • 04Includes gr.ChatInterface for building chatbot UIs.
  • 05Generates a public share link with share=True while computation stays local.
  • 06Ships Python and JavaScript clients for querying Gradio apps programmatically.

Use cases

  • Showing a trained machine learning model to colleagues or stakeholders through a shareable web demo.
  • Building a quick interactive UI for testing a model or API during development.
  • Creating a chatbot front end for an LLM application.
  • Hosting a model demo on Hugging Face Spaces.

Quick start

  1. 1

    Install Gradio with pip (Python 3.10 or higher required)

    pip install --upgrade gradio
  2. 2

    Save the example code as app.py and run it

    python app.py

Things to know

  • Requires Python 3.10 or higher.

Topics

FAQ

What is gradio?
Python package for quickly building and sharing web demos and UIs for machine learning models, APIs, or any Python function. Gradio is an open-source Python package that wraps a machine learning model, API, or any Python function in a web interface. A few lines of Python define the function and its input and output components, and the app runs locally in a browser or inside a notebook. No JavaScript, CSS, or web hosting knowledge is required.
Is gradio free to use? What license does it have?
gradio is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is gradio still maintained?
Actively maintained. The last commit to gradio was on Oct 20, 2026.
What can I use gradio for?
Showing a trained machine learning model to colleagues or stakeholders through a shareable web demo. Building a quick interactive UI for testing a model or API during development. Creating a chatbot front end for an LLM application. Hosting a model demo on Hugging Face Spaces.
How do I install gradio?
Install Gradio with pip (Python 3.10 or higher required): pip install --upgrade gradio Save the example code as app.py and run it: python app.py
Where can I get gradio?
The source code and installation instructions are on GitHub: https://github.com/gradio-app/gradio

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects