Update app.py
Browse files
app.py
CHANGED
@@ -51,8 +51,8 @@ def fx_datatable(code:str):
|
|
51 |
exec(fun,namespace)
|
52 |
return namespace['py_exe']
|
53 |
|
54 |
-
def xz():
|
55 |
-
x=pd.DataFrame([
|
56 |
y=x.to_excel('statics/test.xlsx',index=False)
|
57 |
return 'statics/test.xlsx'
|
58 |
|
@@ -161,7 +161,7 @@ py_exe=d_t.to_pandas()'''
|
|
161 |
gr.HTML(S)
|
162 |
with gr.TabItem("下载测试"):
|
163 |
with gr.Row():
|
164 |
-
xz_button=gr.Button("
|
165 |
-
xz_button.click(xz,
|
166 |
|
167 |
demo.launch()
|
|
|
51 |
exec(fun,namespace)
|
52 |
return namespace['py_exe']
|
53 |
|
54 |
+
def xz(a):
|
55 |
+
x=pd.DataFrame([a])
|
56 |
y=x.to_excel('statics/test.xlsx',index=False)
|
57 |
return 'statics/test.xlsx'
|
58 |
|
|
|
161 |
gr.HTML(S)
|
162 |
with gr.TabItem("下载测试"):
|
163 |
with gr.Row():
|
164 |
+
xz_button=gr.Button("绑定下载资源>>")
|
165 |
+
xz_button.click(xz,gr.JSON(label="请输入需要导出的数据字典信息"), gr.File(label="输出下载资源"),api_name='xz')
|
166 |
|
167 |
demo.launch()
|