Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsMar 31, 2026·2 min de lecture

Gradio — Build ML Demos & AI Apps in Python

Python library for building interactive ML demos and AI web apps. Chat interfaces, file upload, image/audio/video I/O. Share with public link. 42K+ stars.

Introduction

Gradio is the standard Python library for building interactive ML demos and AI web applications. Create chat interfaces, image generators, audio processors, and data tools with a few lines of Python — no frontend code needed. Used by Hugging Face, Stability AI, and thousands of ML projects. Automatically generates a web UI and optional public share link. 42,000+ GitHub stars, Apache 2.0.

Best for: ML engineers and researchers who need a quick web interface for their models Works with: Any Python ML library — PyTorch, TensorFlow, Hugging Face, OpenAI, Anthropic, Ollama


Key Features

Pre-Built Components

30+ I/O components: Textbox, Chatbot, Image, Audio, Video, File, DataFrame, Plot, Code, Markdown, and more.

Chat Interface

Production-ready chat UI in 3 lines:

gr.ChatInterface(fn=my_llm_function).launch()

Streaming

Real-time streaming for LLM responses, audio, and video.

Blocks API

Full layout control for complex multi-component apps:

with gr.Blocks() as demo:
    with gr.Row():
        input = gr.Textbox()
        output = gr.Textbox()
    btn = gr.Button("Submit")
    btn.click(fn=process, inputs=input, outputs=output)

Sharing

demo.launch(share=True) generates a public URL — share your app instantly without deployment.

Hugging Face Spaces

Deploy Gradio apps to Hugging Face Spaces for free permanent hosting.


FAQ

Q: What is Gradio? A: A Python library for building ML demos and AI web apps with interactive UIs. Chat, images, audio, video — no frontend code needed. 42K+ stars, used by Hugging Face.

Q: How is Gradio different from Streamlit? A: Gradio is ML-focused with specialized components (image/audio/video I/O, model inference). Streamlit is broader for data apps. Gradio has native Hugging Face Spaces integration.


🙏

Source et remerciements

Created by Gradio. Licensed under Apache 2.0. gradio-app/gradio — 42,000+ GitHub stars

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires