tony1966's picture
initial commit
7e13702 verified
raw
history blame contribute delete
543 Bytes
import gradio as gr
import pandas as pd
data=pd.DataFrame({
'x': ['一月', '二月', '三月', '四月', '五月', '六月'],
'y': [12000, 15000, 17000, 13000, 19000, 21000],
})
plot=gr.BarPlot(
value=data,
x='x',
y='y',
title='上半年月銷售額變化',
x_title='月份',
y_title='銷售額(萬元)',
interactive=True
)
iface=gr.Interface(
fn=lambda: data,
inputs=[],
outputs=plot,
title='長條圖 BarPlot() 測試',
flagging_mode='never',
)
iface.launch()