Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ def load_leaderboard_table_csv(filename, add_hyperlink=True):
|
|
65 |
|
66 |
def get_arena_table(model_table_df):
|
67 |
# sort by rating
|
68 |
-
model_table_df = model_table_df.sort_values(by=["
|
69 |
values = []
|
70 |
for i in range(len(model_table_df)):
|
71 |
row = []
|
@@ -87,23 +87,35 @@ def get_arena_table(model_table_df):
|
|
87 |
)
|
88 |
|
89 |
row.append(
|
90 |
-
model_table_df["
|
91 |
)
|
92 |
|
93 |
row.append(
|
94 |
-
model_table_df["
|
95 |
)
|
96 |
|
97 |
row.append(
|
98 |
-
model_table_df["
|
99 |
)
|
100 |
|
101 |
row.append(
|
102 |
-
model_table_df["
|
103 |
)
|
104 |
|
105 |
row.append(
|
106 |
-
model_table_df["
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
)
|
108 |
values.append(row)
|
109 |
return values
|
@@ -130,11 +142,14 @@ def build_leaderboard_tab(leaderboard_table_file, show_plot=False):
|
|
130 |
"Language Model",
|
131 |
"Open Source",
|
132 |
"Text Recognition",
|
133 |
-
"
|
134 |
-
"
|
135 |
-
"
|
136 |
-
"
|
137 |
-
"
|
|
|
|
|
|
|
138 |
],
|
139 |
datatype=[
|
140 |
"str",
|
@@ -147,11 +162,14 @@ def build_leaderboard_tab(leaderboard_table_file, show_plot=False):
|
|
147 |
"number",
|
148 |
"number",
|
149 |
"number",
|
|
|
|
|
|
|
150 |
],
|
151 |
value=arena_table_vals,
|
152 |
elem_id="arena_leaderboard_dataframe",
|
153 |
height=700,
|
154 |
-
column_widths=[60, 120,150,100, 150, 200, 180, 80, 80, 160],
|
155 |
wrap=True,
|
156 |
)
|
157 |
else:
|
|
|
65 |
|
66 |
def get_arena_table(model_table_df):
|
67 |
# sort by rating
|
68 |
+
model_table_df = model_table_df.sort_values(by=["Average Score"], ascending=False)
|
69 |
values = []
|
70 |
for i in range(len(model_table_df)):
|
71 |
row = []
|
|
|
87 |
)
|
88 |
|
89 |
row.append(
|
90 |
+
model_table_df["Text Referring"].values[model_key]
|
91 |
)
|
92 |
|
93 |
row.append(
|
94 |
+
model_table_df["Text Spotting"].values[model_key]
|
95 |
)
|
96 |
|
97 |
row.append(
|
98 |
+
model_table_df["Relation Extraction"].values[model_key]
|
99 |
)
|
100 |
|
101 |
row.append(
|
102 |
+
model_table_df["Element Parsing"].values[model_key]
|
103 |
)
|
104 |
|
105 |
row.append(
|
106 |
+
model_table_df["Mathematical Calculation"].values[model_key]
|
107 |
+
)
|
108 |
+
|
109 |
+
row.append(
|
110 |
+
model_table_df["Visual Text Understanding"].values[model_key]
|
111 |
+
)
|
112 |
+
|
113 |
+
row.append(
|
114 |
+
model_table_df["Knowledge Reasoning"].values[model_key]
|
115 |
+
)
|
116 |
+
|
117 |
+
row.append(
|
118 |
+
model_table_df["Average Score"].values[model_key]
|
119 |
)
|
120 |
values.append(row)
|
121 |
return values
|
|
|
142 |
"Language Model",
|
143 |
"Open Source",
|
144 |
"Text Recognition",
|
145 |
+
"Text Referring",
|
146 |
+
"Text Spotting",
|
147 |
+
"Relation Extraction",
|
148 |
+
"Element Parsing",
|
149 |
+
"Mathematical Calculation",
|
150 |
+
"Visual Text Understanding"
|
151 |
+
"Knowledge Reasoning",
|
152 |
+
"Average Score",
|
153 |
],
|
154 |
datatype=[
|
155 |
"str",
|
|
|
162 |
"number",
|
163 |
"number",
|
164 |
"number",
|
165 |
+
"number",
|
166 |
+
"number",
|
167 |
+
"number",
|
168 |
],
|
169 |
value=arena_table_vals,
|
170 |
elem_id="arena_leaderboard_dataframe",
|
171 |
height=700,
|
172 |
+
column_widths=[60, 120,150,100, 150, 200, 180, 150, 150, 150, 80, 80, 160],
|
173 |
wrap=True,
|
174 |
)
|
175 |
else:
|