Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def fx_dax(s:str):
|
|
41 |
|
42 |
def fx_datatable(s:str):
|
43 |
a=exec(s)
|
44 |
-
return
|
45 |
|
46 |
demo=gr.Blocks()
|
47 |
with demo:
|
@@ -76,7 +76,7 @@ with demo:
|
|
76 |
with gr.TabItem("Python-Execute"):
|
77 |
gr.Markdown("# Python脚本测试")
|
78 |
d_input=gr.Textbox(label="请填写需要datatable库处理的脚本",lines=18)
|
79 |
-
d_output=gr.
|
80 |
d_button=gr.Button("开始编译>>")
|
81 |
d_button.click(fx_datatable, inputs=d_input, outputs=d_output,api_name='datatable')
|
82 |
demo.launch()
|
|
|
41 |
|
42 |
def fx_datatable(s:str):
|
43 |
a=exec(s)
|
44 |
+
return {k: v.to_json(force_ascii = False) for k, v in x.items() if isinstance(v,pd.DataFrame)}
|
45 |
|
46 |
demo=gr.Blocks()
|
47 |
with demo:
|
|
|
76 |
with gr.TabItem("Python-Execute"):
|
77 |
gr.Markdown("# Python脚本测试")
|
78 |
d_input=gr.Textbox(label="请填写需要datatable库处理的脚本",lines=18)
|
79 |
+
d_output=gr.JSON(label="输出>")
|
80 |
d_button=gr.Button("开始编译>>")
|
81 |
d_button.click(fx_datatable, inputs=d_input, outputs=d_output,api_name='datatable')
|
82 |
demo.launch()
|