eduagarcia
commited on
Update functions.py
Browse files- functions.py +12 -4
functions.py
CHANGED
@@ -12,9 +12,10 @@ from huggingface_hub import HfApi
|
|
12 |
|
13 |
BOT_HF_TOKEN = os.getenv('BOT_HF_TOKEN')
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
18 |
|
19 |
source_name = "Open Portuguese LLM Leaderboard"
|
20 |
default_pull_request_title = "Adding the Open Portuguese LLM Leaderboard Evaluation Results"
|
@@ -27,7 +28,14 @@ The purpose of this PR is to add evaluation results from the [🚀 Open Portugue
|
|
27 |
If you encounter any issues, please report them to https://huggingface.co/spaces/eduagarcia-temp/portuguese-leaderboard-results-to-modelcard/discussions
|
28 |
"""
|
29 |
|
30 |
-
def search(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
result_df = df[df["Model Name"] == value]
|
32 |
return result_df.iloc[0].to_dict() if not result_df.empty else None
|
33 |
|
|
|
12 |
|
13 |
BOT_HF_TOKEN = os.getenv('BOT_HF_TOKEN')
|
14 |
|
15 |
+
|
16 |
+
#data = get_json_format_data()
|
17 |
+
#finished_models = get_datas(data)
|
18 |
+
#df = pd.DataFrame(finished_models)
|
19 |
|
20 |
source_name = "Open Portuguese LLM Leaderboard"
|
21 |
default_pull_request_title = "Adding the Open Portuguese LLM Leaderboard Evaluation Results"
|
|
|
28 |
If you encounter any issues, please report them to https://huggingface.co/spaces/eduagarcia-temp/portuguese-leaderboard-results-to-modelcard/discussions
|
29 |
"""
|
30 |
|
31 |
+
def search(query_df, value):
|
32 |
+
global df
|
33 |
+
if df is None and query_df is None:
|
34 |
+
data = get_json_format_data()
|
35 |
+
finished_models = get_datas(data)
|
36 |
+
df = pd.DataFrame(finished_models)
|
37 |
+
if query_df is not None:
|
38 |
+
df = query_df
|
39 |
result_df = df[df["Model Name"] == value]
|
40 |
return result_df.iloc[0].to_dict() if not result_df.empty else None
|
41 |
|