Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,14 +33,10 @@ def update_elo_rating(new_rating):
|
|
33 |
elo_ratings = get_user_elo_ratings()
|
34 |
|
35 |
# Function to update the rating of a specific player
|
36 |
-
def update_rating(example):
|
37 |
-
return {'rating': new_rating}
|
38 |
|
39 |
# Update the dataset
|
40 |
-
updated_dataset = elo_ratings.map(update_rating)
|
41 |
-
|
42 |
# Convert updated dataset to a dictionary for pushing
|
43 |
-
|
44 |
if response.status_code == 200:
|
45 |
print("Successfully updated the dataset")
|
46 |
else:
|
|
|
33 |
elo_ratings = get_user_elo_ratings()
|
34 |
|
35 |
# Function to update the rating of a specific player
|
|
|
|
|
36 |
|
37 |
# Update the dataset
|
|
|
|
|
38 |
# Convert updated dataset to a dictionary for pushing
|
39 |
+
elo_ratings.push_to_hub("rwitz/mistral-elo-ratings",token=os.environ.get("huggingface_token"))
|
40 |
if response.status_code == 200:
|
41 |
print("Successfully updated the dataset")
|
42 |
else:
|