mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-17 11:29:58 +08:00
* fix responsiveness of embedded lineplot * regenerate notebook * nav button and sidebar * better styling * fix broken quickstart link * fix styling on close button * styling * undo assets change * changelog * refactor code --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
24 lines
548 B
Python
24 lines
548 B
Python
import gradio as gr
|
|
from vega_datasets import data
|
|
|
|
css = "footer {display: none !important;} .gradio-container {min-height: 0px !important;}"
|
|
|
|
with gr.Blocks(css=css) 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=300,
|
|
show_label=False,
|
|
).style(
|
|
container=False,
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|