Update app.py
Browse files
app.py
CHANGED
@@ -125,7 +125,11 @@ with demo:
|
|
125 |
|
126 |
with gr.TabItem("Python-Execute"):
|
127 |
gr.Markdown("# Python脚本测试")
|
128 |
-
|
|
|
|
|
|
|
|
|
129 |
d_output=gr.DataFrame(label="输出>")
|
130 |
d_button=gr.Button("开始编译>>")
|
131 |
d_button.click(fx_datatable, inputs=d_input, outputs=d_output,api_name='pyexe')
|
|
|
125 |
|
126 |
with gr.TabItem("Python-Execute"):
|
127 |
gr.Markdown("# Python脚本测试")
|
128 |
+
test_code='''from datatable import (dt, f,fread, by, ifelse, update, sort,count, min, max, mean, sum, rowsum)
|
129 |
+
DT=fread('https://huggingface.co/spaces/changxin/test/raw/main/statics/test.csv')
|
130 |
+
d_t=DT[:,sum(f.销量),by('小组')]
|
131 |
+
py_exe=d_t.to_pandas()'''
|
132 |
+
d_input=gr.Textbox(label="请填写需要datatable库处理的脚本(最终输出使用变量名py_exe)",lines=18,placeholder=test_code)
|
133 |
d_output=gr.DataFrame(label="输出>")
|
134 |
d_button=gr.Button("开始编译>>")
|
135 |
d_button.click(fx_datatable, inputs=d_input, outputs=d_output,api_name='pyexe')
|