rwitz commited on
Commit
45dd2d8
1 Parent(s): 0981be6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -19,7 +19,7 @@ def clear_chat(state):
19
 
20
 
21
 
22
- from datasets import load_dataset
23
  import requests
24
  import os
25
 
@@ -40,6 +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
  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")
 
19
 
20
 
21
 
22
+ from datasets import load_dataset,DatasetDict
23
  import requests
24
  import os
25
 
 
40
  updated_dataset = elo_ratings.map(update_rating)
41
 
42
  # Convert updated dataset to a dictionary for pushing
43
+ updated_dataset=DatasetDict({'train':updated_dataset})
44
  updated_dataset.push_to_hub("rwitz/mistral-elo-ratings",token=os.environ.get("huggingface_token"))
45
  if response.status_code == 200:
46
  print("Successfully updated the dataset")