Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ def pd_bokeh():
|
|
| 27 |
df=pd.DataFrame({'班级':['天','地','玄','黄'],'姓名':['诸葛清明','公孙轩辕','李耳','石破天'],'成绩':[66,78,99,85]})
|
| 28 |
tt=df.plot_bokeh.bar(x='姓名',y='成绩',ylabel="群员吹水战绩",title="吹牛逼你们是认真的",alpha=0.6,figsize=(600,300),show_figure=False,legend="bottom_right")
|
| 29 |
pandas_bokeh.save(tt)
|
| 30 |
-
return 'test.html'
|
| 31 |
#def pyg2plot_chart():
|
| 32 |
# bar = Plot("Column")
|
| 33 |
# bar.set_options({"height": 600,"width":800,"data": [{ "年": "2001", "销量": 3 },{ "年": "2002", "销量": 4 },{ "年": "2003", "销量": 5.5 },{"年": "2004", "销量": 7 },{ "年": "2005", "销量": 8.9 },{ "年": "2006", "销量": 10}],"xField": "年","yField": "销量","label": {}})
|
|
@@ -50,7 +50,7 @@ with demo:
|
|
| 50 |
plotly_button.click(pd_plotly, inputs=[], outputs=plotly_output)
|
| 51 |
with gr.TabItem("pd_bokeh"):
|
| 52 |
bokeh_button=gr.Button("pd_bokeh>>")
|
| 53 |
-
bokeh_output=
|
| 54 |
bokeh_button.click(pd_bokeh, inputs=[], outputs=bokeh_output)
|
| 55 |
# with gr.TabItem("pyg2plot"):
|
| 56 |
# pyg2_button=gr.Button("pyg2plot>>")
|
|
|
|
| 27 |
df=pd.DataFrame({'班级':['天','地','玄','黄'],'姓名':['诸葛清明','公孙轩辕','李耳','石破天'],'成绩':[66,78,99,85]})
|
| 28 |
tt=df.plot_bokeh.bar(x='姓名',y='成绩',ylabel="群员吹水战绩",title="吹牛逼你们是认真的",alpha=0.6,figsize=(600,300),show_figure=False,legend="bottom_right")
|
| 29 |
pandas_bokeh.save(tt)
|
| 30 |
+
return 'test.html'
|
| 31 |
#def pyg2plot_chart():
|
| 32 |
# bar = Plot("Column")
|
| 33 |
# bar.set_options({"height": 600,"width":800,"data": [{ "年": "2001", "销量": 3 },{ "年": "2002", "销量": 4 },{ "年": "2003", "销量": 5.5 },{"年": "2004", "销量": 7 },{ "年": "2005", "销量": 8.9 },{ "年": "2006", "销量": 10}],"xField": "年","yField": "销量","label": {}})
|
|
|
|
| 50 |
plotly_button.click(pd_plotly, inputs=[], outputs=plotly_output)
|
| 51 |
with gr.TabItem("pd_bokeh"):
|
| 52 |
bokeh_button=gr.Button("pd_bokeh>>")
|
| 53 |
+
bokeh_output=gr.File(label="bokeh_chart")
|
| 54 |
bokeh_button.click(pd_bokeh, inputs=[], outputs=bokeh_output)
|
| 55 |
# with gr.TabItem("pyg2plot"):
|
| 56 |
# pyg2_button=gr.Button("pyg2plot>>")
|