Bar Plots in Gradio

Learn how to visualize data using bar charts and display them in Gradio.

The BarPlot component

We can create bar plots using the component BarPlot. This is useful when we want to show a distribution of data points or compare different values across different subgroups of the data.

Press + to interact

This can be instantiated with gr.BarPlot() or with Interface string shortcut ‘barplot’.

Again, it is worth noting that a BarPlot component can not be passed as input into a function. If it is an output, it expects the function to return a pandas DataFrame with the data to plot. ...