propogate lb update
Browse files- src/submission/submit.py +2 -3
src/submission/submit.py
CHANGED
@@ -102,8 +102,7 @@ def timer_space_update(api: HfApi):
|
|
102 |
import threading
|
103 |
import time
|
104 |
|
105 |
-
thread = threading.Thread(target=api.restart_space
|
106 |
-
time.sleep(2)
|
107 |
thread.start()
|
108 |
thread.join()
|
109 |
|
@@ -220,7 +219,7 @@ def process_submission(file_path: str, metadata: Dict, version="v0") -> str:
|
|
220 |
success, message = submit_leaderboard_to_hub(all_entries, version)
|
221 |
if not success:
|
222 |
return styled_error(message)
|
223 |
-
|
224 |
return styled_message(f"Submission successful! Model evaluated and leaderboard updated.")
|
225 |
|
226 |
except Exception as eval_error:
|
|
|
102 |
import threading
|
103 |
import time
|
104 |
|
105 |
+
thread = threading.Thread(target=lambda: time.sleep(2) and api.restart_space(REPO_ID))
|
|
|
106 |
thread.start()
|
107 |
thread.join()
|
108 |
|
|
|
219 |
success, message = submit_leaderboard_to_hub(all_entries, version)
|
220 |
if not success:
|
221 |
return styled_error(message)
|
222 |
+
timer_space_update(api)
|
223 |
return styled_message(f"Submission successful! Model evaluated and leaderboard updated.")
|
224 |
|
225 |
except Exception as eval_error:
|