Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
pminervini
commited on
Commit
·
e394fbd
1
Parent(s):
7148b21
update
Browse files
app.py
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
#!/usr/bin/env python
|
2 |
|
|
|
|
|
|
|
|
|
3 |
import gradio as gr
|
4 |
import pandas as pd
|
5 |
|
@@ -55,10 +59,12 @@ def restart_space():
|
|
55 |
def init_space():
|
56 |
dataset_df = get_dataset_summary_table(file_path='blog/Hallucination-Leaderboard-Summary.csv')
|
57 |
|
58 |
-
import socket
|
59 |
if socket.gethostname() not in {'neuromancer'}:
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
62 |
|
63 |
raw_data, original_df = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
|
64 |
|
|
|
1 |
#!/usr/bin/env python
|
2 |
|
3 |
+
import os
|
4 |
+
import datetime
|
5 |
+
import socket
|
6 |
+
|
7 |
import gradio as gr
|
8 |
import pandas as pd
|
9 |
|
|
|
59 |
def init_space():
|
60 |
dataset_df = get_dataset_summary_table(file_path='blog/Hallucination-Leaderboard-Summary.csv')
|
61 |
|
|
|
62 |
if socket.gethostname() not in {'neuromancer'}:
|
63 |
+
if (os.path.exists(EVAL_REQUESTS_PATH) and
|
64 |
+
os.path.exists(EVAL_RESULTS_PATH) and
|
65 |
+
(datetime.datetime.now() - datetime.datetime.fromtimestamp(os.path.getmtime(EVAL_REQUESTS_PATH))).days > 1):
|
66 |
+
ui_snapshot_download(repo_id=QUEUE_REPO, local_dir=EVAL_REQUESTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30)
|
67 |
+
ui_snapshot_download(repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30)
|
68 |
|
69 |
raw_data, original_df = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
|
70 |
|