Spaces:
Sleeping
Sleeping
import gradio as gr | |
import pandas as pd | |
data=pd.DataFrame({ | |
'x': [49, 65, 53, 45, 56, 47, 52, 61], | |
'y': [159, 177, 156, 163, 164, 158, 166, 171] | |
}) | |
plot=gr.ScatterPlot( | |
value=data, | |
x='x', | |
y='y', | |
title='身高與體重關係', | |
x_title='體重(Kg)', | |
y_title='身高(Cm)', | |
interactive=True | |
) | |
iface=gr.Interface( | |
fn=lambda: data, | |
inputs=[], | |
outputs=plot, | |
title='分佈圖 ScatterPlot() 測試', | |
flagging_mode='never', | |
) | |
iface.launch() |