TheXeos commited on
Commit
3ee7ba6
1 Parent(s): 2248e1c

Please work :(

Browse files
Files changed (1) hide show
  1. background_task.py +3 -2
background_task.py CHANGED
@@ -7,10 +7,11 @@ from huggingface_hub import HfApi, Repository
7
 
8
  DATASET_REPO_URL = "https://huggingface.co/datasets/CarlCochet/BotFightData"
9
  ELO_FILENAME = "soccer_elo.csv"
 
10
  HF_TOKEN = os.environ.get("HF_TOKEN")
11
 
12
  repo = Repository(
13
- local_dir="soccer_elo", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
14
  )
15
 
16
 
@@ -112,7 +113,7 @@ class Matchmaking:
112
  data_dict["games_played"].append(model.games_played)
113
  df = pd.DataFrame(data_dict)
114
  print(df.head())
115
- df.to_csv(ELO_FILENAME)
116
  repo.push_to_hub(commit_message="Update ELO")
117
  # df_matches = pd.DataFrame(self.matches)
118
  # date = datetime.now()
 
7
 
8
  DATASET_REPO_URL = "https://huggingface.co/datasets/CarlCochet/BotFightData"
9
  ELO_FILENAME = "soccer_elo.csv"
10
+ ELO_DIR = "soccer_elo"
11
  HF_TOKEN = os.environ.get("HF_TOKEN")
12
 
13
  repo = Repository(
14
+ local_dir=ELO_DIR, clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
15
  )
16
 
17
 
 
113
  data_dict["games_played"].append(model.games_played)
114
  df = pd.DataFrame(data_dict)
115
  print(df.head())
116
+ df.to_csv(os.path.join(ELO_DIR, ELO_FILENAME), index=False)
117
  repo.push_to_hub(commit_message="Update ELO")
118
  # df_matches = pd.DataFrame(self.matches)
119
  # date = datetime.now()