Update app.py
Browse files
app.py
CHANGED
|
@@ -47,9 +47,8 @@ def pyecharts1():
|
|
| 47 |
bar = Bar()
|
| 48 |
bar.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"])
|
| 49 |
bar.add_yaxis("商家A", [5, 20, 36, 10, 75, 90])
|
| 50 |
-
tt=pyecharts.conf.PyEChartsConfig()
|
| 51 |
bar.render('test.html')
|
| 52 |
-
return 'test.html'
|
| 53 |
def cff():
|
| 54 |
|
| 55 |
df=pd.DataFrame([[0.2,0.4,0.6],[0.4,0.3,0.4],[0.4,0.5,0.2],[0.5,0.4,0.4]],columns=['a','b','c'])
|
|
@@ -99,7 +98,7 @@ with demo:
|
|
| 99 |
bokeh_button.click(pd_bokeh, inputs=[], outputs=bokeh_output,api_name='pd_bokeh')
|
| 100 |
with gr.TabItem("pyecharts"):
|
| 101 |
ehc_button=gr.Button("pyecharts>>")
|
| 102 |
-
ehc_output=
|
| 103 |
ehc_button.click(pyecharts1, inputs=[], outputs=ehc_output,api_name='pyecharts')
|
| 104 |
with gr.TabItem("cufflinks"):
|
| 105 |
cff_button=gr.Button("cufflinks>>")
|
|
|
|
| 47 |
bar = Bar()
|
| 48 |
bar.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"])
|
| 49 |
bar.add_yaxis("商家A", [5, 20, 36, 10, 75, 90])
|
|
|
|
| 50 |
bar.render('test.html')
|
| 51 |
+
return 'test.html'
|
| 52 |
def cff():
|
| 53 |
|
| 54 |
df=pd.DataFrame([[0.2,0.4,0.6],[0.4,0.3,0.4],[0.4,0.5,0.2],[0.5,0.4,0.4]],columns=['a','b','c'])
|
|
|
|
| 98 |
bokeh_button.click(pd_bokeh, inputs=[], outputs=bokeh_output,api_name='pd_bokeh')
|
| 99 |
with gr.TabItem("pyecharts"):
|
| 100 |
ehc_button=gr.Button("pyecharts>>")
|
| 101 |
+
ehc_output=gr.File(label="pyecharts_chart")
|
| 102 |
ehc_button.click(pyecharts1, inputs=[], outputs=ehc_output,api_name='pyecharts')
|
| 103 |
with gr.TabItem("cufflinks"):
|
| 104 |
cff_button=gr.Button("cufflinks>>")
|