juncliu commited on
Commit
35d42fa
·
1 Parent(s): 6070272

update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -35,23 +35,23 @@ def restart_space():
35
  API.restart_space(repo_id=REPO_ID)
36
 
37
 
38
- ## Space initialisation
39
- try:
40
- print(EVAL_REQUESTS_PATH)
41
- snapshot_download(
42
- repo_id=QUEUE_REPO, local_dir=EVAL_REQUESTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30,
43
- token=TOKEN
44
- )
45
- except Exception:
46
- restart_space()
47
- try:
48
- print(EVAL_RESULTS_PATH)
49
- snapshot_download(
50
- repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30,
51
- token=TOKEN
52
- )
53
- except Exception:
54
- restart_space()
55
 
56
  # # LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
57
  # df = pd.read_csv('LOTSAv2_EvalBenchmark(Long).csv')
@@ -276,6 +276,6 @@ with demo:
276
  )
277
 
278
  scheduler = BackgroundScheduler()
279
- scheduler.add_job(restart_space, "interval", seconds=1800)
280
  scheduler.start()
281
  demo.queue(default_concurrency_limit=40).launch()
 
35
  API.restart_space(repo_id=REPO_ID)
36
 
37
 
38
+ # ## Space initialisation
39
+ # try:
40
+ # print(EVAL_REQUESTS_PATH)
41
+ # snapshot_download(
42
+ # repo_id=QUEUE_REPO, local_dir=EVAL_REQUESTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30,
43
+ # token=TOKEN
44
+ # )
45
+ # except Exception:
46
+ # restart_space()
47
+ # try:
48
+ # print(EVAL_RESULTS_PATH)
49
+ # snapshot_download(
50
+ # repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30,
51
+ # token=TOKEN
52
+ # )
53
+ # except Exception:
54
+ # restart_space()
55
 
56
  # # LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
57
  # df = pd.read_csv('LOTSAv2_EvalBenchmark(Long).csv')
 
276
  )
277
 
278
  scheduler = BackgroundScheduler()
279
+ # scheduler.add_job(restart_space, "interval", seconds=1800)
280
  scheduler.start()
281
  demo.queue(default_concurrency_limit=40).launch()