Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
kennymckormick
commited on
Commit
•
746f6aa
1
Parent(s):
a4e8212
update leaderboard code
Browse files- lb_info.py +9 -4
lb_info.py
CHANGED
@@ -225,13 +225,18 @@ def BUILD_L2_DF(results, dataset):
|
|
225 |
res[d].append(item[dataset][d])
|
226 |
|
227 |
df = pd.DataFrame(res)
|
228 |
-
|
229 |
-
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
check_box = {}
|
232 |
check_box['essential'] = ['Method', 'Parameters (B)', 'Language Model', 'Vision Model']
|
233 |
-
check_box['required'] =
|
234 |
-
check_box['all'] =
|
235 |
type_map = defaultdict(lambda: 'number')
|
236 |
type_map['Method'] = 'html'
|
237 |
type_map['Language Model'] = type_map['Vision Model'] = type_map['OpenSource'] = type_map['Verified'] = 'str'
|
|
|
225 |
res[d].append(item[dataset][d])
|
226 |
|
227 |
df = pd.DataFrame(res)
|
228 |
+
all_fields = overall_fields + non_overall_fields
|
229 |
+
# Use the first 5 non-overall fields as required fields
|
230 |
+
required_fields = overall_fields if len(overall_fields) else non_overall_fields[:5]
|
231 |
+
|
232 |
+
if 'Overall' in overall_fields:
|
233 |
+
df = df.sort_values('Overall')
|
234 |
+
df = df.iloc[::-1]
|
235 |
|
236 |
check_box = {}
|
237 |
check_box['essential'] = ['Method', 'Parameters (B)', 'Language Model', 'Vision Model']
|
238 |
+
check_box['required'] = required_fields
|
239 |
+
check_box['all'] = all_fields
|
240 |
type_map = defaultdict(lambda: 'number')
|
241 |
type_map['Method'] = 'html'
|
242 |
type_map['Language Model'] = type_map['Vision Model'] = type_map['OpenSource'] = type_map['Verified'] = 'str'
|