File size: 619 Bytes
4a5ee12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cdee46d
4a5ee12
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr
from vega_datasets import data

cars = data.cars()

css = "footer {display: none !important;} .gradio-container {min-height: 0px !important;}"

with gr.Blocks(css=css) as demo:
    gr.ScatterPlot(show_label=False,
                   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").style(container=False)


if __name__ == "__main__":
    demo.launch()