mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
9d159be249
* Add missing demos * Add code * Linting * Format notebook * Remove extra print * Update demo/barplot_component/run.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Fix code component formatting * Fix barplot --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
22 lines
497 B
Python
22 lines
497 B
Python
import gradio as gr
|
|
import pandas as pd
|
|
|
|
simple = pd.DataFrame(
|
|
{
|
|
"item": ["A", "B", "C", "D", "E", "F", "G", "H", "I"],
|
|
"inventory": [28, 55, 43, 91, 81, 53, 19, 87, 52],
|
|
}
|
|
)
|
|
|
|
css = (
|
|
"footer {display: none !important;} .gradio-container {min-height: 0px !important;}"
|
|
)
|
|
|
|
with gr.Blocks(css=css) as demo:
|
|
gr.BarPlot(value=simple, x="item", y="inventory", title="Simple Bar Plot").style(
|
|
container=False,
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|