changxin commited on
Commit
e07283d
ยท
1 Parent(s): 8ceb05e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -51,6 +51,8 @@ def seab():
51
  df = pd.DataFrame({'a': range(10), 'b': [1,3,1,4,5,2,0,5,8,5]})
52
  g=sns.relplot(x="a", y="b", kind="line", data=df)
53
  return plt
 
 
54
  #def pyg2plot_chart():
55
  # bar = Plot("Column")
56
  # 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": {}})
@@ -87,6 +89,10 @@ with demo:
87
  sb_button=gr.Button("seaborn>>")
88
  sb_output=gr.Plot(label="seaborn_chart")
89
  sb_button.click(seab, inputs=[], outputs=sb_output,api_name='seaborn')
 
 
 
 
90
  # with gr.TabItem("pyg2plot"):
91
  # pyg2_button=gr.Button("pyg2plot>>")
92
  # pyg2_output=gr.Plot(label="pyg2plot_chart")
 
51
  df = pd.DataFrame({'a': range(10), 'b': [1,3,1,4,5,2,0,5,8,5]})
52
  g=sns.relplot(x="a", y="b", kind="line", data=df)
53
  return plt
54
+ def pyg2():
55
+ return ''
56
  #def pyg2plot_chart():
57
  # bar = Plot("Column")
58
  # 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": {}})
 
89
  sb_button=gr.Button("seaborn>>")
90
  sb_output=gr.Plot(label="seaborn_chart")
91
  sb_button.click(seab, inputs=[], outputs=sb_output,api_name='seaborn')
92
+ with gr.TabItem("pyg2plot"):
93
+ g2plot_button=gr.Button("pyg2plot>>")
94
+ g2plot_output=gr.Plot(label="pyg2plot_chart")
95
+ g2plot_button.click(pyg2, inputs=[], outputs=g2plot_output,api_name='pyg2plot')
96
  # with gr.TabItem("pyg2plot"):
97
  # pyg2_button=gr.Button("pyg2plot>>")
98
  # pyg2_output=gr.Plot(label="pyg2plot_chart")