mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-07 11:46:51 +08:00
* Add gradio demo * Add linplot component notebook * Link live_dashboard to LinePlot * Fix notebooks + lint
22 lines
449 B
Python
22 lines
449 B
Python
import gradio as gr
|
|
from vega_datasets import data
|
|
|
|
with gr.Blocks() as demo:
|
|
gr.LinePlot(
|
|
data.stocks(),
|
|
x="date",
|
|
y="price",
|
|
color="symbol",
|
|
color_legend_position="bottom",
|
|
title="Stock Prices",
|
|
tooltip=["date", "price", "symbol"],
|
|
height=300,
|
|
width=500,
|
|
show_label=False,
|
|
).style(
|
|
container=False,
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|