eduagarcia
commited on
Commit
•
a02bd06
1
Parent(s):
f22aa15
Update functions.py
Browse files- functions.py +3 -2
functions.py
CHANGED
@@ -152,7 +152,8 @@ def get_eval_results(repo):
|
|
152 |
md_writer.value_matrix = [["Average", f"**{results['Average ⬆️']}**"]] + [[v["dataset_name"], v["metric_value"]] for v in task_summary.values()]
|
153 |
|
154 |
text = f"""
|
155 |
-
# Open Portuguese LLM Leaderboard Evaluation Results
|
|
|
156 |
Detailed results can be found [here]({get_details_url(repo)}) and on the [🚀 Open Portuguese LLM Leaderboard](https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard)
|
157 |
|
158 |
{md_writer.dumps()}
|
@@ -224,7 +225,7 @@ def commit(repo, pr_number=None, message=default_pull_request_title, oauth_token
|
|
224 |
|
225 |
try:
|
226 |
try: # check if there is a readme already
|
227 |
-
readme_text = get_edited_yaml_readme(repo, token=token) + get_eval_results(repo)
|
228 |
except Exception as e:
|
229 |
if "Repo card metadata block was not found." in str(e): # There is no readme
|
230 |
readme_text = get_edited_yaml_readme(repo, token=token)
|
|
|
152 |
md_writer.value_matrix = [["Average", f"**{results['Average ⬆️']}**"]] + [[v["dataset_name"], v["metric_value"]] for v in task_summary.values()]
|
153 |
|
154 |
text = f"""
|
155 |
+
# Open Portuguese LLM Leaderboard Evaluation Results
|
156 |
+
|
157 |
Detailed results can be found [here]({get_details_url(repo)}) and on the [🚀 Open Portuguese LLM Leaderboard](https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard)
|
158 |
|
159 |
{md_writer.dumps()}
|
|
|
225 |
|
226 |
try:
|
227 |
try: # check if there is a readme already
|
228 |
+
readme_text = get_edited_yaml_readme(repo, token=token) + '\n' + get_eval_results(repo)
|
229 |
except Exception as e:
|
230 |
if "Repo card metadata block was not found." in str(e): # There is no readme
|
231 |
readme_text = get_edited_yaml_readme(repo, token=token)
|