Huang Yue commited on
Commit
9673861
·
1 Parent(s): 76ae4e8
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -1,9 +1,20 @@
1
  import gradio as gr
 
2
 
3
 
4
- def greet(name):
5
- return "Hello " + name + "!!"
6
 
7
 
8
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
9
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ import pandas as pd
3
 
4
 
5
+ def filter_records(records, part):
6
+ return records[records["part"] == part]
7
 
8
 
9
+ demo = gr.Interface(
10
+ filter_records,
11
+ [
12
+ gr.Dataframe(pd.read_csv('leaderboard.csv')
13
+ ),
14
+ gr.Dropdown(["Toxicity", "Bias", "Value-alignment"]),
15
+ ],
16
+ "dataframe",
17
+ description="Enter the part.",
18
+ )
19
+
20
+ demo.launch()