Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,13 +22,16 @@ def clear_chat(state):
|
|
22 |
|
23 |
global_elo_ratings=None
|
24 |
|
25 |
-
from datasets import load_dataset,DatasetDict
|
26 |
import requests
|
27 |
import os
|
28 |
|
29 |
def get_user_elo_ratings():
|
30 |
global global_elo_ratings
|
31 |
-
|
|
|
|
|
|
|
32 |
global_elo_ratings = dataset['train'] # or the relevant split
|
33 |
return global_elo_ratings
|
34 |
|
|
|
22 |
|
23 |
global_elo_ratings=None
|
24 |
|
25 |
+
from datasets import load_dataset,DatasetDict,Dataset
|
26 |
import requests
|
27 |
import os
|
28 |
|
29 |
def get_user_elo_ratings():
|
30 |
global global_elo_ratings
|
31 |
+
try:
|
32 |
+
dataset = load_dataset("rwitz/mistral-elo-ratings", download_mode="force_redownload")
|
33 |
+
else:
|
34 |
+
dataset=Dataset.from_dict({})
|
35 |
global_elo_ratings = dataset['train'] # or the relevant split
|
36 |
return global_elo_ratings
|
37 |
|