Spaces:
Sleeping
Sleeping
Commit
·
0f98b2f
1
Parent(s):
c24ff43
adding bonus
Browse files
app.py
CHANGED
|
@@ -311,11 +311,11 @@ def display_leaderboard():
|
|
| 311 |
for user, points_dict in dataset[0].items():
|
| 312 |
points = points_dict.get("points", 0)
|
| 313 |
last_5_results = " ".join(points_dict.get("last_5_results", ["⚪"] * 5)) # Default: 5 white circles
|
| 314 |
-
bonus = points_dict.get("redistributed_bonus", 0)
|
| 315 |
users_data.append({
|
| 316 |
'User': user,
|
| 317 |
'Points': points,
|
| 318 |
-
'Redistribution Bonus': bonus,
|
| 319 |
'Last 5 Bids': last_5_results
|
| 320 |
})
|
| 321 |
else:
|
|
@@ -330,7 +330,7 @@ def display_leaderboard():
|
|
| 330 |
leaderboard['Rank'] = range(1, len(leaderboard) + 1)
|
| 331 |
|
| 332 |
# Select and order the columns for display
|
| 333 |
-
leaderboard = leaderboard[['Rank', 'User', 'Points', '
|
| 334 |
|
| 335 |
st.dataframe(leaderboard, hide_index=True)
|
| 336 |
except Exception as e:
|
|
@@ -563,7 +563,7 @@ def update_leaderboard_and_outcomes(match_id, winning_team, man_of_the_match, ou
|
|
| 563 |
users.to_json(USERS_JSON)
|
| 564 |
updated_dataset = Dataset.from_pandas(users_df)
|
| 565 |
updated_dataset.push_to_hub("Jay-Rajput/DIS_IPL_Leads", split="train")
|
| 566 |
-
redistribute_lost_points(match_id)
|
| 567 |
|
| 568 |
outcomes.to_json(OUTCOMES)
|
| 569 |
outcomes.push_to_hub("Jay-Rajput/DIS_IPL_Outcomes", split="train")
|
|
|
|
| 311 |
for user, points_dict in dataset[0].items():
|
| 312 |
points = points_dict.get("points", 0)
|
| 313 |
last_5_results = " ".join(points_dict.get("last_5_results", ["⚪"] * 5)) # Default: 5 white circles
|
| 314 |
+
# bonus = points_dict.get("redistributed_bonus", 0)
|
| 315 |
users_data.append({
|
| 316 |
'User': user,
|
| 317 |
'Points': points,
|
| 318 |
+
# 'Redistribution Bonus': bonus,
|
| 319 |
'Last 5 Bids': last_5_results
|
| 320 |
})
|
| 321 |
else:
|
|
|
|
| 330 |
leaderboard['Rank'] = range(1, len(leaderboard) + 1)
|
| 331 |
|
| 332 |
# Select and order the columns for display
|
| 333 |
+
leaderboard = leaderboard[['Rank', 'User', 'Points', 'Last 5 Bids']]
|
| 334 |
|
| 335 |
st.dataframe(leaderboard, hide_index=True)
|
| 336 |
except Exception as e:
|
|
|
|
| 563 |
users.to_json(USERS_JSON)
|
| 564 |
updated_dataset = Dataset.from_pandas(users_df)
|
| 565 |
updated_dataset.push_to_hub("Jay-Rajput/DIS_IPL_Leads", split="train")
|
| 566 |
+
# redistribute_lost_points(match_id)
|
| 567 |
|
| 568 |
outcomes.to_json(OUTCOMES)
|
| 569 |
outcomes.push_to_hub("Jay-Rajput/DIS_IPL_Outcomes", split="train")
|