XufengDuan commited on
Commit
010a64a
1 Parent(s): dac62d3

updated scripts

Browse files
Files changed (4) hide show
  1. .DS_Store +0 -0
  2. .idea/HumanLikeness.iml +14 -0
  3. .idea/misc.xml +7 -0
  4. app.py +4 -2
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
.idea/HumanLikeness.iml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/.venv" />
6
+ </content>
7
+ <orderEntry type="jdk" jdkName="Python 3.11 (default)" jdkType="Python SDK" />
8
+ <orderEntry type="sourceFolder" forTests="false" />
9
+ </component>
10
+ <component name="PyDocumentationSettings">
11
+ <option name="format" value="GOOGLE" />
12
+ <option name="myDocStringFormat" value="Google" />
13
+ </component>
14
+ </module>
.idea/misc.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Black">
4
+ <option name="sdkName" value="Python 3.11 (HumanLikeness)" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (default)" project-jdk-type="Python SDK" />
7
+ </project>
app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  import pandas as pd
3
  from apscheduler.schedulers.background import BackgroundScheduler
4
  from huggingface_hub import snapshot_download
 
5
 
6
  import socket
7
  import src.display.about as about
@@ -9,6 +10,7 @@ from src.display.css_html_js import custom_css
9
  import src.display.utils as utils
10
  import src.envs as envs
11
  import src.populate as populate
 
12
  import src.submission.submit as submit
13
  import os
14
  TOKEN = os.environ.get("H4_TOKEN", None)
@@ -31,9 +33,9 @@ def init_space():
31
  # sync model_type with open-llm-leaderboard
32
  ui_snapshot_download(repo_id=QUEUE_REPO, local_dir=EVAL_REQUESTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30)
33
  ui_snapshot_download(repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30)
34
- raw_data, original_df = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, "", COLS, BENCHMARK_COLS)
35
 
36
- finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df = get_evaluation_queue_df(EVAL_REQUESTS_PATH, EVAL_COLS)
37
  return original_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df
38
 
39
  original_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df = init_space()
 
2
  import pandas as pd
3
  from apscheduler.schedulers.background import BackgroundScheduler
4
  from huggingface_hub import snapshot_download
5
+ from src.envs import API, EVAL_REQUESTS_PATH, EVAL_RESULTS_PATH, QUEUE_REPO, REPO_ID, RESULTS_REPO
6
 
7
  import socket
8
  import src.display.about as about
 
10
  import src.display.utils as utils
11
  import src.envs as envs
12
  import src.populate as populate
13
+ from src.populate import get_evaluation_queue_df, get_leaderboard_df
14
  import src.submission.submit as submit
15
  import os
16
  TOKEN = os.environ.get("H4_TOKEN", None)
 
33
  # sync model_type with open-llm-leaderboard
34
  ui_snapshot_download(repo_id=QUEUE_REPO, local_dir=EVAL_REQUESTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30)
35
  ui_snapshot_download(repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30)
36
+ raw_data, original_df = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, "", utils.COLS, utils.BENCHMARK_COLS)
37
 
38
+ finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df = get_evaluation_queue_df(EVAL_REQUESTS_PATH, utils.EVAL_COLS)
39
  return original_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df
40
 
41
  original_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df = init_space()