Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,15 +40,7 @@ def update_elo_rating(new_rating):
|
|
40 |
updated_dataset = elo_ratings.map(update_rating)
|
41 |
|
42 |
# Convert updated dataset to a dictionary for pushing
|
43 |
-
|
44 |
-
|
45 |
-
# Push the updated dataset back to Hugging Face
|
46 |
-
response = requests.post(
|
47 |
-
"https://huggingface.co/datasets/rwitz/mistral-elo-ratings",
|
48 |
-
headers={"Authorization": f"Bearer {os.environ.get('HUGGINGFACE_TOKEN')}"},
|
49 |
-
json=updated_data
|
50 |
-
)
|
51 |
-
|
52 |
if response.status_code == 200:
|
53 |
print("Successfully updated the dataset")
|
54 |
else:
|
|
|
40 |
updated_dataset = elo_ratings.map(update_rating)
|
41 |
|
42 |
# Convert updated dataset to a dictionary for pushing
|
43 |
+
updated_dataset.push_to_hub("rwitz/mistral-elo-ratings",token=os.environ.get("huggingface_token"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
if response.status_code == 200:
|
45 |
print("Successfully updated the dataset")
|
46 |
else:
|