Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,15 +23,15 @@ from src.init import get_all_requested_models, load_all_info_from_hub
|
|
23 |
def get_leaderboard_df():
|
24 |
|
25 |
data = {
|
26 |
-
'Datasets': ['SOTA(FT)', 'SOTA(ZS)', 'FLAN-T5', 'GPT-3', 'GPT-3.5v2', 'GPT-3.5v3', 'ChatGPT', 'GPT-4'],
|
27 |
-
'KQApro': ['93.85', '94.20', '37.27', '38.28', '38.01', '40.35', '47.93', '57.20'],
|
28 |
-
'LC-quad2': ['33.10', '-', '30.14', '33.04', '33.77', '39.04', '42.76', '54.95'],
|
29 |
-
'WQSP': ['73.10', '62.98', '59.87', '67.68', '72.34', '79.60', '83.70', '90.45'],
|
30 |
-
'CWQ': ['72.20', '-', '46.69', '51.77', '53.96', '57.54', '64.02', '71.00'],
|
31 |
-
'GrailQA': ['76.31', '-', '29.02', '27.58', '30.50', '35.43', '46.77', '51.40'],
|
32 |
-
'GraphQ': ['41.30', '-', '32.27', '38.32', '40.85', '47.95', '53.10', '63.20'],
|
33 |
-
'QALD-9': ['67.82', '-', '30.17', '38.54', '44.96', '46.19', '45.71', '57.20'],
|
34 |
-
'MKQA': ['46.00', '-', '20.17', '26.97', '30.14', '39.05', '44.30', '59.20']
|
35 |
}
|
36 |
|
37 |
df = pd.DataFrame(data)
|
@@ -41,14 +41,11 @@ def get_leaderboard_df():
|
|
41 |
original_df = get_leaderboard_df()
|
42 |
leaderboard_df = original_df.copy()
|
43 |
|
44 |
-
|
45 |
def search_table(df, query):
|
46 |
if query == "":
|
47 |
return df
|
48 |
else:
|
49 |
-
return df[df.apply(lambda row: query.lower() in row.astype(str).
|
50 |
-
|
51 |
-
|
52 |
|
53 |
|
54 |
demo = gr.Blocks(css=custom_css)
|
|
|
23 |
def get_leaderboard_df():
|
24 |
|
25 |
data = {
|
26 |
+
'Datasets': ['metrics','SOTA(FT)', 'SOTA(ZS)', 'FLAN-T5', 'GPT-3', 'GPT-3.5v2', 'GPT-3.5v3', 'ChatGPT', 'GPT-4'],
|
27 |
+
'KQApro': ['Acc','93.85', '94.20', '37.27', '38.28', '38.01', '40.35', '47.93', '57.20'],
|
28 |
+
'LC-quad2': ['F1','33.10', '-', '30.14', '33.04', '33.77', '39.04', '42.76', '54.95'],
|
29 |
+
'WQSP': ['Acc','73.10', '62.98', '59.87', '67.68', '72.34', '79.60', '83.70', '90.45'],
|
30 |
+
'CWQ': ['Acc','72.20', '-', '46.69', '51.77', '53.96', '57.54', '64.02', '71.00'],
|
31 |
+
'GrailQA': ['Acc','76.31', '-', '29.02', '27.58', '30.50', '35.43', '46.77', '51.40'],
|
32 |
+
'GraphQ': ['Acc','41.30', '-', '32.27', '38.32', '40.85', '47.95', '53.10', '63.20'],
|
33 |
+
'QALD-9': ['F1','67.82', '-', '30.17', '38.54', '44.96', '46.19', '45.71', '57.20'],
|
34 |
+
'MKQA': ['Acc','46.00', '-', '20.17', '26.97', '30.14', '39.05', '44.30', '59.20']
|
35 |
}
|
36 |
|
37 |
df = pd.DataFrame(data)
|
|
|
41 |
original_df = get_leaderboard_df()
|
42 |
leaderboard_df = original_df.copy()
|
43 |
|
|
|
44 |
def search_table(df, query):
|
45 |
if query == "":
|
46 |
return df
|
47 |
else:
|
48 |
+
return df[df.apply(lambda row: query.lower() in row.astype(str).lower(), axis=1).any()]
|
|
|
|
|
49 |
|
50 |
|
51 |
demo = gr.Blocks(css=custom_css)
|