shaokun commited on
Commit
31fd16b
·
1 Parent(s): 66254e4

process csv

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+
4
+ def load_csv(file):
5
+ df = pd.read_csv(file)
6
+ return df
7
+
8
+ iface = gr.Interface(
9
+ fn=load_csv,
10
+ inputs="file",
11
+ outputs="dataframe",
12
+ title="CSV Loader",
13
+ description="Load a CSV file and display its contents.",
14
+ )
15
+
16
+ iface.launch()