changxin commited on
Commit
723598f
·
1 Parent(s): 79abd13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -73,9 +73,8 @@ def pyhighchats():
73
  def d3_js():
74
  fig=plt.figure()
75
  obj,=plt.plot([3,1,4,1,5])
76
- tt=mpld3.fig_to_dict(fig)
77
  rr=mpld3.fig_to_html(fig)
78
- return tt,rr
79
 
80
  demo=gr.Blocks()
81
  with demo:
@@ -123,7 +122,7 @@ with demo:
123
  pyhc_button.click(pyhighchats, inputs=[], outputs=pyhc_output,api_name='pyhcharts')
124
  with gr.TabItem("d3JS"):
125
  d3_button=gr.Button("D3JS>>")
126
- d3_output=[gr.Textbox(label="D3_chart",lines=8),gr.Textbox(label="D3_chart1",lines=18)]
127
  d3_button.click(d3_js, inputs=[], outputs=d3_output,api_name='d3_js')
128
 
129
  with gr.TabItem("echarts"):
 
73
  def d3_js():
74
  fig=plt.figure()
75
  obj,=plt.plot([3,1,4,1,5])
 
76
  rr=mpld3.fig_to_html(fig)
77
+ return rr
78
 
79
  demo=gr.Blocks()
80
  with demo:
 
122
  pyhc_button.click(pyhighchats, inputs=[], outputs=pyhc_output,api_name='pyhcharts')
123
  with gr.TabItem("d3JS"):
124
  d3_button=gr.Button("D3JS>>")
125
+ d3_output=gr.Textbox(label="D3_chart1",lines=18)
126
  d3_button.click(d3_js, inputs=[], outputs=d3_output,api_name='d3_js')
127
 
128
  with gr.TabItem("echarts"):