Spaces:
Runtime error
Runtime error
Clémentine
commited on
Commit
•
7df7951
1
Parent(s):
8131376
prevent multilple loading
Browse files
app.py
CHANGED
@@ -435,6 +435,8 @@ def update_leaderboard(payload: WebhookPayload) -> None:
|
|
435 |
"""Redownloads the leaderboard dataset each time it updates"""
|
436 |
if payload.repo.type == "dataset" and payload.event.action == "update":
|
437 |
global NEW_DATA_ON_LEADERBOARD
|
|
|
|
|
438 |
NEW_DATA_ON_LEADERBOARD = True
|
439 |
|
440 |
datasets.load_dataset(
|
|
|
435 |
"""Redownloads the leaderboard dataset each time it updates"""
|
436 |
if payload.repo.type == "dataset" and payload.event.action == "update":
|
437 |
global NEW_DATA_ON_LEADERBOARD
|
438 |
+
if NEW_DATA_ON_LEADERBOARD:
|
439 |
+
return
|
440 |
NEW_DATA_ON_LEADERBOARD = True
|
441 |
|
442 |
datasets.load_dataset(
|