# Gradio

Python interface toolkit for functions, demonstrations and interactive applications\.

ID: Q728 · Revision: 776

Type: software · License: Apache\-2\.0[^gradio-license] · Status: active

Website: https://gradio.app/



Gradio is an open\-source Python package for building browser interfaces around functions, APIs and machine\-learning demonstrations\. Its Interface abstraction maps function arguments and return values to UI components, while Blocks supports more customized layouts and interactions\. The package is useful beyond model demos whenever a Python function needs an accessible interactive frontend\.[^gradio]

## Functions and event flows

An Interface connects a function with specified input and output components\. For more complex applications, Blocks places components into a layout and attaches event listeners to operations such as clicks or value changes\. Those listeners define dataflow, and multiple flows can coexist in one app\. This is application code rather than an automatic conversion of an entire analysis environment\.[^gradio][^gradio-blocks]

## Temporary public links

Gradio's share option creates a publicly reachable proxy link while computation continues on the originating machine, which must remain running\. The documented share links expire after a week\. This is useful for temporary demonstrations but is a different delivery arrangement from deploying the app to a persistent server or hosting platform\.[^gradio-share]

## Files and access

Sharing exposes designated static files, allowed paths and files copied into Gradio's cache\. The file\-access guide says cached files can be reached by users of the running app\. Developers should therefore review what their functions return and what paths are exposed, rather than treating an unlisted file URL as private session storage\.[^gradio-files]

## Handling uploaded files

The package provides upload\-size limits and blocked\-path configuration, with explicit blocks taking precedence over allowed paths\. Its guide cautions against forwarding arbitrary user strings into file\-output components and recommends keeping exposed directories narrowly scoped\. These controls are deployment requirements when a demonstration accepts public input, not evidence that every shared app is safe by default\.[^gradio-files]

## Licensing and hosting

Gradio's code is Apache\-2\.0 licensed\. The sharing guide describes hosting on Hugging Face Spaces or a developer's own server as alternatives to temporary links\. Runtime capacity, dependencies and any models or data used by an application remain separate from the package license and need to be evaluated for the chosen deployment\.[^gradio-license][^gradio-share]

## Substitution considerations

Gradio can substitute for [Streamlit](/streamlit) for function\-oriented tools and demonstrations with explicit inputs and outputs\. A broader dashboard may require custom Blocks composition, and application state and layout will need adaptation\. The comparison concerns interface\-building tasks; it does not establish interchangeable source files or equivalent hosting guarantees\.[^gradio][^gradio-blocks][^st]

## Capabilities and substitutions

### Function interfaces — supported

Maps Python inputs and outputs to interactive components\.[^gradio]

Use case: Interactive data applications · Platforms: Web browser · Region: Runtime, dependencies and hosting requirements apply

### Temporary sharing — limited

Public proxy links depend on the originating runtime and expire after one week\.[^gradio-share]

Use case: Interactive data applications · Platforms: Web browser · Region: Runtime, dependencies and hosting requirements apply

### [Substitute for Streamlit](/streamlit) — limited

Suitable for function\-oriented demos and tools; broader dashboards may require custom Blocks composition\.[^gradio][^gradio-blocks][^st]

Use case: Interactive data applications · Platforms: Web browser · Region: Runtime, dependencies and hosting requirements apply

## References

[^gradio-license]: [Gradio license](<https://github.com/gradio-app/gradio/blob/main/LICENSE>) — Apache License 2\.0 (vendor; retrieved 2026-10-07T04:27:08Z)

[^gradio]: [Gradio quickstart](<https://gradio.app/guides/quickstart>) — Arbitrary Python functions; Interface inputs and outputs (vendor; retrieved 2026-10-07T04:27:21Z)

[^gradio-blocks]: [Gradio Blocks and events](<https://gradio.app/guides/blocks-and-event-listeners>) — Components; event dataflow; multiple flows (vendor; retrieved 2026-10-07T04:28:07Z)

[^gradio-share]: [Gradio sharing](<https://gradio.app/guides/sharing-your-app>) — Public proxy links; one\-week expiration; host stays running (vendor; retrieved 2026-10-07T04:27:41Z)

[^gradio-files]: [Gradio file access](<https://gradio.app/guides/file-access>) — Static paths; cache access; blocked paths; upload limits (vendor; retrieved 2026-10-07T04:28:07Z)

[^st]: [Streamlit documentation](<https://docs.streamlit.io/>) — Python framework; deployment products (vendor; retrieved 2026-10-07T04:26:50Z)

Source revision: https://substitutefor.net/entities/Q728?revision=776
