rwitz commited on
Commit
b4b5ce5
1 Parent(s): 3704691

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- dataset = load_dataset("rwitz/mistral-elo-ratings", download_mode="force_redownload")
 
 
 
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