Spaces:
Sleeping
Sleeping
jarajpu
commited on
Commit
·
c7d864c
1
Parent(s):
28b0c49
adding leads
Browse files- app.py +3 -3
- leaders/users.json +1 -1
- users.json +1 -1
app.py
CHANGED
|
@@ -201,7 +201,7 @@ def submit_prediction(
|
|
| 201 |
def get_user_total_points(user_name):
|
| 202 |
users_dataset = load_dataset("Jay-Rajput/DIS_IPL_Leads", split="train")
|
| 203 |
users = users_dataset.to_dict()
|
| 204 |
-
return users.get(user_name, {})[0]
|
| 205 |
|
| 206 |
|
| 207 |
def calculate_max_bid_points(user_name):
|
|
@@ -295,12 +295,12 @@ def display_leaderboard():
|
|
| 295 |
users_data = []
|
| 296 |
if dataset:
|
| 297 |
for user, points_dict in dataset[0].items():
|
| 298 |
-
points = points_dict.get("
|
| 299 |
users_data.append({'User': user, 'Points': points})
|
| 300 |
else:
|
| 301 |
data = load_users(USERS_JSON)
|
| 302 |
for user, points_dict in data.items():
|
| 303 |
-
points = points_dict.get("
|
| 304 |
users_data.append({'User': user, 'Points': points})
|
| 305 |
|
| 306 |
leaderboard = pd.DataFrame(users_data)
|
|
|
|
| 201 |
def get_user_total_points(user_name):
|
| 202 |
users_dataset = load_dataset("Jay-Rajput/DIS_IPL_Leads", split="train")
|
| 203 |
users = users_dataset.to_dict()
|
| 204 |
+
return users.get(user_name, {})[0]
|
| 205 |
|
| 206 |
|
| 207 |
def calculate_max_bid_points(user_name):
|
|
|
|
| 295 |
users_data = []
|
| 296 |
if dataset:
|
| 297 |
for user, points_dict in dataset[0].items():
|
| 298 |
+
points = points_dict.get("points", 0)
|
| 299 |
users_data.append({'User': user, 'Points': points})
|
| 300 |
else:
|
| 301 |
data = load_users(USERS_JSON)
|
| 302 |
for user, points_dict in data.items():
|
| 303 |
+
points = points_dict.get("points", 0)
|
| 304 |
users_data.append({'User': user, 'Points': points})
|
| 305 |
|
| 306 |
leaderboard = pd.DataFrame(users_data)
|
leaders/users.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"Arpit": {"
|
|
|
|
| 1 |
+
{"Arpit": {"points": 6500}, "Ganesh": {"points": 7251}, "Haaris": {"points": 30200}, "Jay": {"points": 35166}, "Kishore": {"points": 4420}, "Megha": {"points": 52420}, "Naveein": {"points": 31700}, "Neha": {"points": 17800}, "Praveen": {"points": 500}, "Rakesh": {"points": 500}, "Sai": {"points": 51661}, "Sahil": {"points": 0}, "Sunil": {"points": 67445}, "Vaibhav": {"points": 26101}, "Vinay": {"points": 40720}}
|
users.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"Arpit": {"
|
|
|
|
| 1 |
+
{"Arpit": {"points": 6500}, "Ganesh": {"points": 7251}, "Haaris": {"points": 30200}, "Jay": {"points": 35166}, "Kishore": {"points": 4420}, "Megha": {"points": 52420}, "Naveein": {"points": 31700}, "Neha": {"points": 17800}, "Praveen": {"points": 500}, "Rakesh": {"points": 500}, "Sai": {"points": 51661}, "Sahil": {"points": 0}, "Sunil": {"points": 67445}, "Vaibhav": {"points": 26101}, "Vinay": {"points": 40720}}
|