Spaces:
Sleeping
Sleeping
jarajpu
commited on
Commit
·
4c974b2
1
Parent(s):
6b23196
Updating repo for leads
Browse files
app.py
CHANGED
|
@@ -383,7 +383,7 @@ ADMIN_PASSPHRASE = "admin123"
|
|
| 383 |
|
| 384 |
def fetch_latest_predictions(match_id):
|
| 385 |
# Load the dataset. Adjust "split" to "train" or appropriate if "predictions" is a configuration.
|
| 386 |
-
dataset = load_dataset("Jay-Rajput/
|
| 387 |
|
| 388 |
# Convert the dataset to a pandas DataFrame
|
| 389 |
df = pd.DataFrame(dataset)
|
|
@@ -412,7 +412,7 @@ def update_leaderboard_and_outcomes(match_id, winning_team, man_of_the_match):
|
|
| 412 |
|
| 413 |
outcomes = load_data(OUTCOMES_JSON) # Load existing match outcomes
|
| 414 |
# Load existing match outcomes and user data from the test split
|
| 415 |
-
dataset = load_dataset("Jay-Rajput/
|
| 416 |
users = pd.DataFrame(dataset)
|
| 417 |
|
| 418 |
# Directly update or add the match outcome
|
|
@@ -445,7 +445,7 @@ def update_leaderboard_and_outcomes(match_id, winning_team, man_of_the_match):
|
|
| 445 |
users.to_json(USERS_JSON)
|
| 446 |
# Convert the updated DataFrame back to a Hugging Face Dataset and push updates
|
| 447 |
updated_dataset = Dataset.from_pandas(users)
|
| 448 |
-
updated_dataset.push_to_hub("Jay-Rajput/
|
| 449 |
|
| 450 |
|
| 451 |
with st.sidebar:
|
|
|
|
| 383 |
|
| 384 |
def fetch_latest_predictions(match_id):
|
| 385 |
# Load the dataset. Adjust "split" to "train" or appropriate if "predictions" is a configuration.
|
| 386 |
+
dataset = load_dataset("Jay-Rajput/DIS_IPL_Preds")
|
| 387 |
|
| 388 |
# Convert the dataset to a pandas DataFrame
|
| 389 |
df = pd.DataFrame(dataset)
|
|
|
|
| 412 |
|
| 413 |
outcomes = load_data(OUTCOMES_JSON) # Load existing match outcomes
|
| 414 |
# Load existing match outcomes and user data from the test split
|
| 415 |
+
dataset = load_dataset("Jay-Rajput/DIS_IPL_Leads")
|
| 416 |
users = pd.DataFrame(dataset)
|
| 417 |
|
| 418 |
# Directly update or add the match outcome
|
|
|
|
| 445 |
users.to_json(USERS_JSON)
|
| 446 |
# Convert the updated DataFrame back to a Hugging Face Dataset and push updates
|
| 447 |
updated_dataset = Dataset.from_pandas(users)
|
| 448 |
+
updated_dataset.push_to_hub("Jay-Rajput/DIS_IPL_Leads")
|
| 449 |
|
| 450 |
|
| 451 |
with st.sidebar:
|