Spaces:
Sleeping
Sleeping
Huang Yue
commited on
Commit
·
9673861
1
Parent(s):
76ae4e8
update
Browse files
app.py
CHANGED
@@ -1,9 +1,20 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
|
4 |
-
def
|
5 |
-
return "
|
6 |
|
7 |
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|