changxin commited on
Commit
e87fb60
·
1 Parent(s): ac9b706

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,7 +47,7 @@ def pyecharts1():
47
  bar.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"])
48
  bar.add_yaxis("商家A", [5, 20, 36, 10, 75, 90])
49
  bar.render('test.html')
50
- return 'test.html'
51
  def cff():
52
 
53
  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'])
@@ -97,7 +97,7 @@ with demo:
97
  bokeh_button.click(pd_bokeh, inputs=[], outputs=bokeh_output,api_name='pd_bokeh')
98
  with gr.TabItem("pyecharts"):
99
  ehc_button=gr.Button("pyecharts>>")
100
- ehc_output=gr.File(label="pyecharts_chart")
101
  ehc_button.click(pyecharts1, inputs=[], outputs=ehc_output,api_name='pyecharts')
102
  with gr.TabItem("cufflinks"):
103
  cff_button=gr.Button("cufflinks>>")
 
47
  bar.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"])
48
  bar.add_yaxis("商家A", [5, 20, 36, 10, 75, 90])
49
  bar.render('test.html')
50
+ return 'test.html',bar
51
  def cff():
52
 
53
  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'])
 
97
  bokeh_button.click(pd_bokeh, inputs=[], outputs=bokeh_output,api_name='pd_bokeh')
98
  with gr.TabItem("pyecharts"):
99
  ehc_button=gr.Button("pyecharts>>")
100
+ ehc_output=[gr.File(label="pyecharts_chart"),gr.Textbox(lines=18)]
101
  ehc_button.click(pyecharts1, inputs=[], outputs=ehc_output,api_name='pyecharts')
102
  with gr.TabItem("cufflinks"):
103
  cff_button=gr.Button("cufflinks>>")