mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-13 11:57:29 +08:00
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()
|