LukasGe commited on
Commit
bde66bc
1 Parent(s): 2d58bb1

Update load_data.py

Browse files
Files changed (1) hide show
  1. load_data.py +3 -3
load_data.py CHANGED
@@ -24,7 +24,7 @@ def save_validated_to_hub(records, ctx):
24
  if HF_TOKEN:
25
  print("Pushing the dataset")
26
  print(ds)
27
- ds.push_to_hub(HUB_DATASET_NAME, token=HF_TOKEN, private=True, branch = 'validated') #push annotations on the validated branch of the dataset
28
  else:
29
  print("SET HF_TOKEN and HUB_DATASET_NAME TO SYNC YOUR DATASET!!!")
30
  else:
@@ -39,13 +39,13 @@ class LoadDatasets:
39
  # load data from validated branch
40
  try:
41
  print(f"Trying to sync with {HUB_DATASET_NAME}")
42
- old_ds = load_dataset(HUB_DATASET_NAME, split="train", use_auth_token=HF_TOKEN, revision='validated')
43
  except Exception as e:
44
  print(f"Not possible to sync with {HUB_DATASET_NAME}")
45
  print(e)
46
  old_ds = None
47
 
48
- dataset = load_dataset(HUB_DATASET_NAME, split="train", use_auth_token=HF_TOKEN) # get starting file from the main branch of the dataset
49
 
50
 
51
  if old_ds:
 
24
  if HF_TOKEN:
25
  print("Pushing the dataset")
26
  print(ds)
27
+ ds.push_to_hub(HUB_DATASET_NAME, token=HF_TOKEN, private=True)
28
  else:
29
  print("SET HF_TOKEN and HUB_DATASET_NAME TO SYNC YOUR DATASET!!!")
30
  else:
 
39
  # load data from validated branch
40
  try:
41
  print(f"Trying to sync with {HUB_DATASET_NAME}")
42
+ old_ds = load_dataset(HUB_DATASET_NAME, split="train", use_auth_token=HF_TOKEN)
43
  except Exception as e:
44
  print(f"Not possible to sync with {HUB_DATASET_NAME}")
45
  print(e)
46
  old_ds = None
47
 
48
+ dataset = load_dataset('LukasGe/DVS-job-titles-raw', split="train", use_auth_token=HF_TOKEN) # get starting file from the main branch of the dataset
49
 
50
 
51
  if old_ds: