Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
eduagarcia
commited on
Commit
•
68fa530
1
Parent(s):
19a1194
Init dynamic_info if empty
Browse files
app.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
from apscheduler.schedulers.background import BackgroundScheduler
|
@@ -68,6 +70,10 @@ def init_space():
|
|
68 |
except Exception:
|
69 |
restart_space()
|
70 |
|
|
|
|
|
|
|
|
|
71 |
|
72 |
raw_data, original_df = get_leaderboard_df(
|
73 |
results_path=EVAL_RESULTS_PATH,
|
|
|
1 |
+
import os
|
2 |
+
import json
|
3 |
import gradio as gr
|
4 |
import pandas as pd
|
5 |
from apscheduler.schedulers.background import BackgroundScheduler
|
|
|
70 |
except Exception:
|
71 |
restart_space()
|
72 |
|
73 |
+
# Init in case of empty
|
74 |
+
if not os.path.exists(DYNAMIC_INFO_FILE_PATH):
|
75 |
+
with open(DYNAMIC_INFO_FILE_PATH, "w") as f:
|
76 |
+
json.dump({}, f, indent=2)
|
77 |
|
78 |
raw_data, original_df = get_leaderboard_df(
|
79 |
results_path=EVAL_RESULTS_PATH,
|