Spaces:
Sleeping
Sleeping
Commit
·
d79e927
1
Parent(s):
d50e2d0
points redistribution
Browse files
app.py
CHANGED
|
@@ -292,8 +292,10 @@ def display_predictions():
|
|
| 292 |
|
| 293 |
def redistribute_lost_points(match_id) -> dict:
|
| 294 |
# Load already processed matches
|
| 295 |
-
|
| 296 |
-
|
|
|
|
|
|
|
| 297 |
|
| 298 |
if match_id in done_matches:
|
| 299 |
return {}
|
|
|
|
| 292 |
|
| 293 |
def redistribute_lost_points(match_id) -> dict:
|
| 294 |
# Load already processed matches
|
| 295 |
+
if not os.path.exists(REDISTRIBUTED_JSON) or os.stat(REDISTRIBUTED_JSON).st_size == 0:
|
| 296 |
+
with open(REDISTRIBUTED_JSON, "w") as f:
|
| 297 |
+
json.dump([], f)
|
| 298 |
+
done_matches = load_data(REDISTRIBUTED_JSON)
|
| 299 |
|
| 300 |
if match_id in done_matches:
|
| 301 |
return {}
|