Saivivek25 commited on
Commit
963bc61
·
verified ·
1 Parent(s): b9d2668

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+
4
+ # Dataset load cheyyadam (public dataset link or local file inside repo)
5
+ data = pd.read_csv("mydata.csv")
6
+
7
+ def show_head(rows):
8
+ return data.head(rows).to_string()
9
+
10
+ iface = gr.Interface(
11
+ fn=show_head,
12
+ inputs=gr.Slider(1, 10, step=1, label="How many rows?"),
13
+ outputs="text",
14
+ title="CSV Viewer",
15
+ description="Display rows from uploaded dataset"
16
+ )
17
+
18
+ iface.launch()