Spaces:
Sleeping
Sleeping
Huang Yue
commited on
Commit
·
2c38ef9
1
Parent(s):
a9892de
add table data
Browse files
app.py
CHANGED
@@ -5,12 +5,11 @@ import pandas as pd
|
|
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(
|
13 |
-
),
|
14 |
gr.Dropdown(["Toxicity", "Bias", "Value-alignment"]),
|
15 |
],
|
16 |
"dataframe",
|
|
|
5 |
def filter_records(records, part):
|
6 |
return records[records["part"] == part]
|
7 |
|
8 |
+
data = pd.read_csv('leaderboard.csv')
|
9 |
demo = gr.Interface(
|
10 |
filter_records,
|
11 |
[
|
12 |
+
gr.Dataframe(data, headers=data.columns, datatype=data.dtypes),
|
|
|
13 |
gr.Dropdown(["Toxicity", "Bias", "Value-alignment"]),
|
14 |
],
|
15 |
"dataframe",
|