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.