Jimin Huang
commited on
Commit
·
cc4119e
1
Parent(s):
0359b37
feat: modify leaderboard
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ task3_cols = [col_name for col_name, _ in TASK3_COLS]
|
|
42 |
def create_df_dict(lang, lang_cols):
|
43 |
# Load leaderboard data with column names
|
44 |
leaderboard_df = pd.read_csv(f"{lang}_result.csv", names=lang_cols)
|
45 |
-
leaderboard_df = leaderboard_df.sort_index(axis=1)
|
46 |
# Move 'key' column to the front
|
47 |
leaderboard_df = leaderboard_df[["Model"] + [col for col in leaderboard_df.columns if col != "Model"]]
|
48 |
cols = leaderboard_df.columns
|
@@ -107,6 +107,7 @@ def create_data_interface(df):
|
|
107 |
value=df.values.tolist(),
|
108 |
headers=[col_name for col_name in headers],
|
109 |
datatype=types,
|
|
|
110 |
)
|
111 |
|
112 |
|
|
|
42 |
def create_df_dict(lang, lang_cols):
|
43 |
# Load leaderboard data with column names
|
44 |
leaderboard_df = pd.read_csv(f"{lang}_result.csv", names=lang_cols)
|
45 |
+
# leaderboard_df = leaderboard_df.sort_index(axis=1)
|
46 |
# Move 'key' column to the front
|
47 |
leaderboard_df = leaderboard_df[["Model"] + [col for col in leaderboard_df.columns if col != "Model"]]
|
48 |
cols = leaderboard_df.columns
|
|
|
107 |
value=df.values.tolist(),
|
108 |
headers=[col_name for col_name in headers],
|
109 |
datatype=types,
|
110 |
+
sort=headers[0], sort_order='descending')
|
111 |
)
|
112 |
|
113 |
|