Favicon of Gradio

Gradio

An open source Python library for AI web apps that run on your computer, with options to share a public link or host on Hugging Face Spaces.

Screenshot of Gradio website

Gradio turns a Python function, model, or API into a web interface. It runs on your computer, making it useful for developers and researchers who want people to try an AI project through a browser. It's open source under the Apache 2.0 license.

You can make a focused demo with text fields, buttons, and outputs without building a frontend in JavaScript or CSS. Gradio also has components for images, audio, video, plots, data tables, and 3D content, so people can interact with a model using the kind of input it expects. For conversational projects, it provides a dedicated chatbot interface.

The scope can grow beyond a simple model demo. Gradio Blocks lets you arrange components and build interactions where one result feeds another part of the app, all from Python. That makes it a fit for testing an idea with colleagues as well as building a more involved tool around a Python workflow.

A local app can be shared through a public link while the demo keeps running on your computer. Hugging Face Spaces is a separate hosting option for keeping an app online. Gradio doesn't prescribe a particular local LLM or model format; its interface can sit in front of a model, an API, or another Python function.

Similar to Gradio