changxin commited on
Commit
7377fc4
·
1 Parent(s): bdd6e43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -74,7 +74,8 @@ def d3_js():
74
  fig=plt.figure()
75
  obj,=plt.plot([3,1,4,1,5])
76
  tt=mpld3.fig_to_dict(fig)
77
- return tt
 
78
 
79
  demo=gr.Blocks()
80
  with demo:
@@ -122,7 +123,7 @@ 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_chart",lines=28)
126
  d3_button.click(d3_js, inputs=[], outputs=d3_output,api_name='d3_js')
127
 
128
  with gr.TabItem("echarts"):
 
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
  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.HTML(label="D3_chart1")]
127
  d3_button.click(d3_js, inputs=[], outputs=d3_output,api_name='d3_js')
128
 
129
  with gr.TabItem("echarts"):