Weyaxi commited on
Commit
bda8f89
·
verified ·
1 Parent(s): e7b5f59

new version of scraper

Browse files
Files changed (1) hide show
  1. 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 get_json_format_data, get_datas
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["Model"] == value]
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
- data = get_json_format_data()
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: