Spaces:
Sleeping
Sleeping
Commit
·
bed9964
1
Parent(s):
6debba1
adding preds repo
Browse files
app.py
CHANGED
|
@@ -379,11 +379,6 @@ def fetch_latest_predictions(match_id):
|
|
| 379 |
return pd.DataFrame()
|
| 380 |
|
| 381 |
|
| 382 |
-
def save_match_outcomes(outcomes):
|
| 383 |
-
with open(OUTCOMES_JSON, 'w') as file:
|
| 384 |
-
json.dump(outcomes, file, indent=4)
|
| 385 |
-
|
| 386 |
-
|
| 387 |
def update_leaderboard_and_outcomes(match_id, winning_team, man_of_the_match):
|
| 388 |
# Fetch latest predictions from the dataset repo
|
| 389 |
predictions = fetch_latest_predictions(match_id)
|
|
@@ -402,7 +397,7 @@ def update_leaderboard_and_outcomes(match_id, winning_team, man_of_the_match):
|
|
| 402 |
outcome_exists = True
|
| 403 |
break
|
| 404 |
if not outcome_exists:
|
| 405 |
-
outcomes.
|
| 406 |
|
| 407 |
# Update user points based on prediction accuracy
|
| 408 |
for idx, prediction in predictions.iterrows():
|
|
|
|
| 379 |
return pd.DataFrame()
|
| 380 |
|
| 381 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 382 |
def update_leaderboard_and_outcomes(match_id, winning_team, man_of_the_match):
|
| 383 |
# Fetch latest predictions from the dataset repo
|
| 384 |
predictions = fetch_latest_predictions(match_id)
|
|
|
|
| 397 |
outcome_exists = True
|
| 398 |
break
|
| 399 |
if not outcome_exists:
|
| 400 |
+
outcomes.add_item({"match_id": match_id, "winning_team": winning_team, "man_of_the_match": man_of_the_match})
|
| 401 |
|
| 402 |
# Update user points based on prediction accuracy
|
| 403 |
for idx, prediction in predictions.iterrows():
|