gradio/demo/scatterplot_component/run.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
423 B
Python
Raw Normal View History

import gradio as gr
from vega_datasets import data
cars = data.cars()
2023-07-08 00:44:16 +08:00
with gr.Blocks() as demo:
gr.ScatterPlot(
value=cars,
x="Horsepower",
y="Miles_per_Gallon",
color="Origin",
tooltip="Name",
title="Car Data",
y_title="Miles per Gallon",
color_legend_title="Origin of Car",
container=False,
)
if __name__ == "__main__":
demo.launch()