new version of scraper
Browse files- functions.py +3 -4
functions.py
CHANGED
@@ -5,7 +5,7 @@ from huggingface_hub.repocard_data import eval_results_to_model_index
|
|
5 |
import time
|
6 |
from pytablewriter import MarkdownTableWriter
|
7 |
import gradio as gr
|
8 |
-
from openllm import
|
9 |
import pandas as pd
|
10 |
|
11 |
BOT_HF_TOKEN = os.getenv('BOT_HF_TOKEN')
|
@@ -23,7 +23,7 @@ If you encounter any issues, please report them to https://huggingface.co/spaces
|
|
23 |
"""
|
24 |
|
25 |
def search(df, value):
|
26 |
-
result_df = df[df["
|
27 |
return result_df.iloc[0].to_dict() if not result_df.empty else None
|
28 |
|
29 |
|
@@ -148,8 +148,7 @@ def get_edited_yaml_readme(repo, token: str | None):
|
|
148 |
|
149 |
def commit(repo, pr_number=None, message="Adding Evaluation Results", oauth_token: gr.OAuthToken | None = None): # specify pr number if you want to edit it, don't if you don't want
|
150 |
global df
|
151 |
-
|
152 |
-
finished_models = get_datas(data)
|
153 |
df = pd.DataFrame(finished_models)
|
154 |
|
155 |
if not oauth_token:
|
|
|
5 |
import time
|
6 |
from pytablewriter import MarkdownTableWriter
|
7 |
import gradio as gr
|
8 |
+
from openllm import get_datas
|
9 |
import pandas as pd
|
10 |
|
11 |
BOT_HF_TOKEN = os.getenv('BOT_HF_TOKEN')
|
|
|
23 |
"""
|
24 |
|
25 |
def search(df, value):
|
26 |
+
result_df = df[df["fullname"] == value]
|
27 |
return result_df.iloc[0].to_dict() if not result_df.empty else None
|
28 |
|
29 |
|
|
|
148 |
|
149 |
def commit(repo, pr_number=None, message="Adding Evaluation Results", oauth_token: gr.OAuthToken | None = None): # specify pr number if you want to edit it, don't if you don't want
|
150 |
global df
|
151 |
+
finished_models = get_datas()
|
|
|
152 |
df = pd.DataFrame(finished_models)
|
153 |
|
154 |
if not oauth_token:
|