tangtang
commited on
Commit
·
0b5fcb3
1
Parent(s):
8199b76
Update space1
Browse files- src/populate.py +12 -12
src/populate.py
CHANGED
|
@@ -22,17 +22,17 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
|
|
| 22 |
|
| 23 |
df = pd.DataFrame.from_records(all_data_json)
|
| 24 |
# print(df.head(10))
|
| 25 |
-
for model_name, info in CLOSED_MODELS.items():
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
|
| 37 |
def extract_first(value):
|
| 38 |
if isinstance(value, (list, np.ndarray)):
|
|
@@ -99,7 +99,7 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
|
|
| 99 |
# if benchmark_cols:
|
| 100 |
# df = df[has_no_nan_values(df, benchmark_cols)]
|
| 101 |
|
| 102 |
-
print(df.head(10))
|
| 103 |
return df
|
| 104 |
|
| 105 |
|
|
|
|
| 22 |
|
| 23 |
df = pd.DataFrame.from_records(all_data_json)
|
| 24 |
# print(df.head(10))
|
| 25 |
+
# for model_name, info in CLOSED_MODELS.items():
|
| 26 |
+
# if model_name not in df['Model'].values:
|
| 27 |
+
# df = pd.concat([df, pd.DataFrame([{
|
| 28 |
+
# "Model": model_name,
|
| 29 |
+
# "params": info["params"],
|
| 30 |
+
# "license": info["license"],
|
| 31 |
+
# "likes": info["likes"],
|
| 32 |
+
# "model_type": info["model_type"],
|
| 33 |
+
# "Precision (%)": 0,
|
| 34 |
+
# "Title search rate (%)": 0
|
| 35 |
+
# }])], ignore_index=True)
|
| 36 |
|
| 37 |
def extract_first(value):
|
| 38 |
if isinstance(value, (list, np.ndarray)):
|
|
|
|
| 99 |
# if benchmark_cols:
|
| 100 |
# df = df[has_no_nan_values(df, benchmark_cols)]
|
| 101 |
|
| 102 |
+
# print(df.head(10))
|
| 103 |
return df
|
| 104 |
|
| 105 |
|