Introduction to Block Layouts
Explore Gradio Blocks to understand how to create customizable machine learning application layouts using Python. Learn how to define components, manage events, and build flexible interfaces beyond simple input-output setups.
We'll cover the following...
Blocks overview
Blocks is Gradio’s low-level API that allows more custom-built applications (and it is still entirely built in Python). Blocks offer more flexibility and customization compared to Interface in the following ways:
Layout of the components: We don’t always just have a simple input on the left and output on the right!
Events that trigger the execution of functions: We can decide which UI components have events attached to them and what events they trigger (whereas in
Interface, these are usually predetermined depending on the components).Data flows: They can be more ...