Spaces:
Running
Running
Commit
·
eb2a754
1
Parent(s):
86a15ac
formatting and download fix
Browse files
app.py
CHANGED
@@ -23,6 +23,7 @@ import weave
|
|
23 |
from datetime import datetime
|
24 |
weave.init(f'leaderboard_testing_{datetime.now().strftime("%Y%m%d%H%M%S")}')
|
25 |
|
|
|
26 |
|
27 |
def restart_space():
|
28 |
API.restart_space(repo_id=REPO_ID, token=HF_TOKEN)
|
@@ -31,7 +32,7 @@ def restart_space():
|
|
31 |
def download_latest_results():
|
32 |
print("Downloading latest results...")
|
33 |
snapshot_download(RESULTS_REPO_ID,
|
34 |
-
local_dir=
|
35 |
repo_type='dataset',
|
36 |
tqdm_class=None,
|
37 |
etag_timeout=30,
|
@@ -39,7 +40,6 @@ def download_latest_results():
|
|
39 |
)
|
40 |
print("Download complete.")
|
41 |
|
42 |
-
abs_path = Path(__file__).parent
|
43 |
|
44 |
# Global variable to store preprocessed data
|
45 |
preprocessed_traces = {}
|
@@ -305,21 +305,21 @@ with gr.Blocks() as demo:
|
|
305 |
|
306 |
with gr.Tab("SWE-Bench"):
|
307 |
with gr.Row():
|
308 |
-
with gr.Column(scale=
|
309 |
-
scatter_plot = gr.Plot(create_scatter_plot(parse_json_files(os.path.join(abs_path, "evals_live"), 'swebench_lite'), "Total Cost", "Accuracy", "Total Cost (in USD)", "Accuracy", ["Agent Name"]))
|
310 |
-
with gr.Column(scale=1):
|
311 |
Leaderboard(
|
312 |
value=parse_json_files(os.path.join(abs_path, "evals_live"), 'swebench_lite'),
|
313 |
select_columns=SelectColumns(
|
314 |
-
default_selection=config.
|
315 |
cant_deselect=["Agent Name"],
|
316 |
label="Select Columns to Display:",
|
317 |
),
|
318 |
-
search_columns=config.
|
319 |
column_widths={"Agent Name": 40,
|
320 |
"Accuracy": 20,
|
321 |
"Total Cost": 20},
|
322 |
)
|
|
|
|
|
323 |
|
324 |
with gr.Tab("About"):
|
325 |
gr.Markdown((Path(__file__).parent / "about.md").read_text())
|
|
|
23 |
from datetime import datetime
|
24 |
weave.init(f'leaderboard_testing_{datetime.now().strftime("%Y%m%d%H%M%S")}')
|
25 |
|
26 |
+
abs_path = Path(__file__).parent
|
27 |
|
28 |
def restart_space():
|
29 |
API.restart_space(repo_id=REPO_ID, token=HF_TOKEN)
|
|
|
32 |
def download_latest_results():
|
33 |
print("Downloading latest results...")
|
34 |
snapshot_download(RESULTS_REPO_ID,
|
35 |
+
local_dir= "evals_upload",
|
36 |
repo_type='dataset',
|
37 |
tqdm_class=None,
|
38 |
etag_timeout=30,
|
|
|
40 |
)
|
41 |
print("Download complete.")
|
42 |
|
|
|
43 |
|
44 |
# Global variable to store preprocessed data
|
45 |
preprocessed_traces = {}
|
|
|
305 |
|
306 |
with gr.Tab("SWE-Bench"):
|
307 |
with gr.Row():
|
308 |
+
with gr.Column(scale=2):
|
|
|
|
|
309 |
Leaderboard(
|
310 |
value=parse_json_files(os.path.join(abs_path, "evals_live"), 'swebench_lite'),
|
311 |
select_columns=SelectColumns(
|
312 |
+
default_selection=config.USACO_ON_LOAD_COLUMNS,
|
313 |
cant_deselect=["Agent Name"],
|
314 |
label="Select Columns to Display:",
|
315 |
),
|
316 |
+
search_columns=config.USACO_SEARCH_COLUMNS,
|
317 |
column_widths={"Agent Name": 40,
|
318 |
"Accuracy": 20,
|
319 |
"Total Cost": 20},
|
320 |
)
|
321 |
+
with gr.Row():
|
322 |
+
scatter_plot = gr.Plot(create_scatter_plot(parse_json_files(os.path.join(abs_path, "evals_live"), 'swebench_lite'), "Total Cost", "Accuracy", "Total Cost (in USD)", "Accuracy", ["Agent Name"]))
|
323 |
|
324 |
with gr.Tab("About"):
|
325 |
gr.Markdown((Path(__file__).parent / "about.md").read_text())
|