AIWiki
Malaysia
Back to all articles
Tools & Platformsopen sourcePythonuser interfaces

Gradio

3 min readUpdated September 2026
Gradio
Type
Open-source Python library for machine-learning interfaces
Created
2019 at Stanford University (Abubakar Abid, Ali Abdalla, Ali Abid and Dawood Khan)
Maintained by
Hugging Face (acquired December 2021)
Licence
Apache-2.0
Current major version
Gradio 6 (2026)
Related
Hugging Face Spaces, ComfyUI, Stable Diffusion WebUI
Gradio is an open-source Python library that lets developers build web interfaces for machine-learning models with only a few lines of code. Created in 2019 and maintained by Hugging Face since 2021, Gradio is widely used for research demonstrations, interactive prototypes and the free demo-hosting service Hugging Face Spaces.[1][2]

History

Gradio began in 2019 at Stanford University, where PhD student Abubakar Abid wanted to share a medical computer-vision model with a doctor who could not run Python. Together with Ali Abdalla, Ali Abid and Dawood Khan, he released the first version of the library, which let machine-learning engineers build and share demos for image, text, speech and video models.[1]

The library grew quickly: by the time Hugging Face acquired Gradio in December 2021, more than 300,000 demos had been built with it. Under Hugging Face, Gradio became the primary toolkit for Hugging Face Spaces, the company's free hosting platform for interactive AI apps.[1][2]

Major versions followed: Gradio 4 in 2023, and Gradio 5 in late 2024, which focused on security hardening and performance and which was by then being installed more than six million times per month. By 2026, the current major release was Gradio 6, with a rebuilt web front end.[4][5]

Key Concepts and Technology

A Gradio app is written entirely in Python. The simplest interface uses the high-level Interface class, which pairs an input component, an output component and a function; the Blocks API offers low-level layout control for more complex applications, and ChatInterface provides a ready-made chat loop for large language models, including streaming responses.[4][6]

Apps can run locally, be embedded in notebooks, or be deployed to a public URL for free through Hugging Face Spaces; a share=True flag can create temporary public links for testing. The library renders in the browser with a component system covering text, images, audio, video, files, plots and chatbots, and Gradio is also the interface layer of other open-source projects — most notably the widely used Stable Diffusion WebUI.[2][5][6]

Because demos are often public, security practice matters: Hugging Face commissioned an external security review of Gradio 5 and published fixes for the issues reported, and the documentation advises users to secure public apps and to configure authentication where needed.[5]

Applications and Impact

Gradio is used across the machine-learning life cycle: researchers share reproducibility demos alongside papers, companies build internal tools and customer-facing prototypes, and educators teach model deployment without front-end development. Its integration with the Hugging Face Hub allows a demo to load a hosted model or call an inference service with a few lines of code, which has made Gradio a default choice for showcasing generative-AI systems, from text and image generation to speech and video.[2][6]

>See Also

References

🇲🇾Malaysian Context

🇲🇾 Gradio's low barrier to entry suits Malaysia's growing developer and student population: it allows teams without front-end engineers to demonstrate AI projects, and free hosting on Hugging Face Spaces removes the need for paid infrastructure during prototyping. Its simplicity makes it a common choice for university coursework, hackathons and data-science competitions in Malaysia, and it complements national efforts to widen practical AI skills under MDEC and the National AI Office, as well as local startup and community programmes that showcase Malaysian-built models and tools.[2]

References

  1. Abid, A. (2021). Gradio is joining Hugging Face! Hugging Face blog. https://huggingface.co/blog/gradio-joins-hf
  2. Hugging Face. Hugging Face Hub documentation — Spaces. https://huggingface.co/docs/hub/en/index
  3. GitHub. gradio-app/gradio repository. https://github.com/gradio-app/gradio
  4. Gradio. Changelog. https://gradio.app/changelog
  5. Hugging Face. (2024). A security review of Gradio 5. https://huggingface.co/blog/gradio-5-security
  6. Gradio. Using Hugging Face integrations. https://gradio.app/guides/using-hugging-face-integrations