gera-richarte commited on
Commit
c670c44
1 Parent(s): 11296d8

using a token to access dataset

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -1,11 +1,11 @@
1
  from datasets import load_dataset, IterableDataset
2
  from functools import partial
3
  from pandas import DataFrame
 
 
4
  import tqdm
5
  import json
6
-
7
- import numpy as np
8
- import gradio as gr
9
 
10
  DEBUG = False
11
 
@@ -46,7 +46,8 @@ def open_dataset(dataset, set_name, split, batch_size, shard = -1):
46
  split=split,
47
  cache_dir="dataset",
48
  data_files=data_files,
49
- streaming=True)
 
50
 
51
  dsi = iter(ds)
52
 
 
1
  from datasets import load_dataset, IterableDataset
2
  from functools import partial
3
  from pandas import DataFrame
4
+ import gradio as gr
5
+ import numpy as np
6
  import tqdm
7
  import json
8
+ import os
 
 
9
 
10
  DEBUG = False
11
 
 
46
  split=split,
47
  cache_dir="dataset",
48
  data_files=data_files,
49
+ streaming=True,
50
+ use_auth_token=os.environ.get("HF_TOKEN"))
51
 
52
  dsi = iter(ds)
53