LysandreJik commited on
Commit
ebe86df
1 Parent(s): 29a308b
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,12 +1,17 @@
 
1
  from datetime import datetime, timedelta
2
  import json
3
  from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
4
  from urllib.parse import parse_qs, urlparse
5
 
6
- from huggingface_hub import list_datasets
7
  from datasets import load_dataset
8
  import numpy as np
9
 
 
 
 
 
10
 
11
  def running_mean(x, N, total_length=-1):
12
  cumsum = np.cumsum(np.insert(x, 0, 0))
 
1
+ import os
2
  from datetime import datetime, timedelta
3
  import json
4
  from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
5
  from urllib.parse import parse_qs, urlparse
6
 
7
+ from huggingface_hub import list_datasets, set_access_token, HfFolder
8
  from datasets import load_dataset
9
  import numpy as np
10
 
11
+ HF_TOKEN = os.environ['HF_TOKEN']
12
+ set_access_token(HF_TOKEN)
13
+ HfFolder.save_token(HF_TOKEN)
14
+
15
 
16
  def running_mean(x, N, total_length=-1):
17
  cumsum = np.cumsum(np.insert(x, 0, 0))