Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,3 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
import pandas as pd
|
3 |
-
|
4 |
# # 定义一个函数,该函数将接受上传的XLSX文件并显示其内容
|
5 |
# def read_xlsx(file):
|
6 |
# try:
|
@@ -22,9 +19,13 @@ import pandas as pd
|
|
22 |
# # 启动Gradio应用程序
|
23 |
# iface.launch()
|
24 |
|
|
|
|
|
|
|
25 |
def process_excel(file):
|
26 |
df = pd.read_excel(file.name, engine='openpyxl')
|
27 |
df = pd.DataFrame(df)
|
28 |
return df
|
|
|
29 |
iface = gr.Interface(fn=process_excel, inputs="file", outputs=[gr.outputs.Dataframe(type='pandas')], title="Excel Processor")
|
30 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
1 |
# # 定义一个函数,该函数将接受上传的XLSX文件并显示其内容
|
2 |
# def read_xlsx(file):
|
3 |
# try:
|
|
|
19 |
# # 启动Gradio应用程序
|
20 |
# iface.launch()
|
21 |
|
22 |
+
import gradio as gr
|
23 |
+
import pandas as pd
|
24 |
+
|
25 |
def process_excel(file):
|
26 |
df = pd.read_excel(file.name, engine='openpyxl')
|
27 |
df = pd.DataFrame(df)
|
28 |
return df
|
29 |
+
|
30 |
iface = gr.Interface(fn=process_excel, inputs="file", outputs=[gr.outputs.Dataframe(type='pandas')], title="Excel Processor")
|
31 |
+
iface.launch(debug=True)
|