Spaces:
Runtime error
Runtime error
daishen
commited on
Commit
•
af9d904
1
Parent(s):
dc5f5d5
update results
Browse files- app.py +2 -2
- get_data_info.py +16 -18
- leaderboard.xlsx +0 -0
- scores.xlsx +0 -0
app.py
CHANGED
@@ -66,7 +66,7 @@ def launch_gradio(df1, df2):
|
|
66 |
|
67 |
with gr.Row():
|
68 |
for key, df in df1.items():
|
69 |
-
if key == "Overall" or key == "Basic
|
70 |
df = df.replace('', 0)
|
71 |
new_df = df[[val for val in df.columns]].copy()
|
72 |
# new_df = reindex_cols(Task_COLS, new_df)
|
@@ -77,7 +77,7 @@ def launch_gradio(df1, df2):
|
|
77 |
|
78 |
with gr.Row():
|
79 |
for key, df in df1.items():
|
80 |
-
if key == "
|
81 |
# if True:
|
82 |
df = df.replace('', 0)
|
83 |
new_df = df[[val for val in df.columns]].copy()
|
|
|
66 |
|
67 |
with gr.Row():
|
68 |
for key, df in df1.items():
|
69 |
+
if key == "Overall" or key == "Basic Information Retrieval":
|
70 |
df = df.replace('', 0)
|
71 |
new_df = df[[val for val in df.columns]].copy()
|
72 |
# new_df = reindex_cols(Task_COLS, new_df)
|
|
|
77 |
|
78 |
with gr.Row():
|
79 |
for key, df in df1.items():
|
80 |
+
if key == "Legal Foundation Inference" or key == "Complex Legal Application":
|
81 |
# if True:
|
82 |
df = df.replace('', 0)
|
83 |
new_df = df[[val for val in df.columns]].copy()
|
get_data_info.py
CHANGED
@@ -8,13 +8,11 @@ def process_plot_data(df, flag=False):
|
|
8 |
df2 = df[["Model", "Domain"]].copy()
|
9 |
|
10 |
columns_names = ["Model", "Domain", "AR", "ER", "NER", "JS", "CR", "CFM", "SCM",
|
11 |
-
"
|
12 |
# 计算新的列的值
|
13 |
for col in columns_names[2:]:
|
14 |
-
if col in ["AR", "ER", "CR", "CFM", "SCM", "CTP", "LQA"]:
|
15 |
df2[col] = df[f"{col}-F1"] * 100
|
16 |
-
if col == "CJP":
|
17 |
-
df2[col] = df[[f"{col}-CP-F1", f"{col}-PTP-F1"]].mean(axis=1) * 100
|
18 |
if col == "NER":
|
19 |
df2[col] = df[f"{col}-Acc"] * 100
|
20 |
if col in ["JRG", "LC", "JS", "CU", "JRG-TAG", "LC-TAG"]:
|
@@ -46,17 +44,17 @@ def plot_data():
|
|
46 |
df = process_plot_data(leaderboard_df)
|
47 |
# df.drop(df[df['Model'] == 'Baichuan-7B'].index, inplace=True)
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
|
53 |
# Get df_overall
|
54 |
df_overall = df.iloc[:, [0] + list(range(2, 15))]
|
55 |
plot_df_dict = {
|
56 |
"Overall": df_overall,
|
57 |
-
"Basic
|
58 |
-
"
|
59 |
-
"Complex Legal Application":
|
60 |
}
|
61 |
return plot_df_dict
|
62 |
|
@@ -72,19 +70,19 @@ def tab_data():
|
|
72 |
leaderboard_df.fillna("-")
|
73 |
# leaderboard_df.drop(leaderboard_df[leaderboard_df['Model'] == 'Baichuan-7B'].index, inplace=True)
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
|
79 |
# Get df_overall
|
80 |
df_overall = leaderboard_df.iloc[:, list(range(0, 56))]
|
81 |
-
|
82 |
"Overall": df_overall,
|
83 |
-
"Basic
|
84 |
-
"
|
85 |
-
"Complex Legal Application":
|
86 |
}
|
87 |
-
return
|
88 |
|
89 |
|
90 |
if __name__ == "__main__":
|
|
|
8 |
df2 = df[["Model", "Domain"]].copy()
|
9 |
|
10 |
columns_names = ["Model", "Domain", "AR", "ER", "NER", "JS", "CR", "CFM", "SCM",
|
11 |
+
"CP", "PTP", "CTP", "LQA", "JRG", "CU", "LC", "JRG-TAG", "LC-TAG"]
|
12 |
# 计算新的列的值
|
13 |
for col in columns_names[2:]:
|
14 |
+
if col in ["AR", "ER", "CR", "CFM", "SCM", "CP", "PTP", "CTP", "LQA"]:
|
15 |
df2[col] = df[f"{col}-F1"] * 100
|
|
|
|
|
16 |
if col == "NER":
|
17 |
df2[col] = df[f"{col}-Acc"] * 100
|
18 |
if col in ["JRG", "LC", "JS", "CU", "JRG-TAG", "LC-TAG"]:
|
|
|
44 |
df = process_plot_data(leaderboard_df)
|
45 |
# df.drop(df[df['Model'] == 'Baichuan-7B'].index, inplace=True)
|
46 |
|
47 |
+
df_BIR = df.iloc[:, [0] + list(range(2, 7))]
|
48 |
+
df_LFI = df.iloc[:, [0] + list(range(7, 13))]
|
49 |
+
df_CLA = df.iloc[:, [0] + list(range(13, 16))]
|
50 |
|
51 |
# Get df_overall
|
52 |
df_overall = df.iloc[:, [0] + list(range(2, 15))]
|
53 |
plot_df_dict = {
|
54 |
"Overall": df_overall,
|
55 |
+
"Basic Information Retrieval": df_BIR,
|
56 |
+
"Legal Foundation Inference": df_LFI,
|
57 |
+
"Complex Legal Application": df_CLA,
|
58 |
}
|
59 |
return plot_df_dict
|
60 |
|
|
|
70 |
leaderboard_df.fillna("-")
|
71 |
# leaderboard_df.drop(leaderboard_df[leaderboard_df['Model'] == 'Baichuan-7B'].index, inplace=True)
|
72 |
|
73 |
+
df_BIR = leaderboard_df.iloc[:, list(range(0, 18))]
|
74 |
+
df_LFI = leaderboard_df.iloc[:, list(range(0, 2)) + list(range(18, 42))]
|
75 |
+
df_CLA = leaderboard_df.iloc[:, list(range(0, 2)) + list(range(42, 56))]
|
76 |
|
77 |
# Get df_overall
|
78 |
df_overall = leaderboard_df.iloc[:, list(range(0, 56))]
|
79 |
+
table_df_dict = {
|
80 |
"Overall": df_overall,
|
81 |
+
"Basic Information Retrieval": df_BIR,
|
82 |
+
"Legal Foundation Inference": df_LFI,
|
83 |
+
"Complex Legal Application": df_CLA,
|
84 |
}
|
85 |
+
return table_df_dict
|
86 |
|
87 |
|
88 |
if __name__ == "__main__":
|
leaderboard.xlsx
CHANGED
Binary files a/leaderboard.xlsx and b/leaderboard.xlsx differ
|
|
scores.xlsx
CHANGED
Binary files a/scores.xlsx and b/scores.xlsx differ
|
|