Download run.py from gradio/scatterplot_component_main: direct link, hf CLI and curl.
- Browser
- Download file 425 Bytes
-
https://huggingface.co/spaces/gradio/scatterplot_component_main/resolve/2f4c078e68fa35ee8f94e02b19c98dd64d9f34b0/run.py
- Command line
-
hf download hf://spaces/gradio/scatterplot_component_main@2f4c078e68fa35ee8f94e02b19c98dd64d9f34b0/run.py
-
curl -L -o run.py https://huggingface.co/spaces/gradio/scatterplot_component_main/resolve/2f4c078e68fa35ee8f94e02b19c98dd64d9f34b0/run.py
425 Bytes
| import gradio as gr | |
| from vega_datasets import data | |
| cars = data.cars() | |
| 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() | |