meg HF Staff commited on
Commit
2befb5b
·
verified ·
1 Parent(s): ef6b71f

Changed variables names.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -59,7 +59,7 @@ def main(percentage=10):
59
  randomize_subset = set(random.sample(range(0, NUM_EXAMPLES), num_new_labels))
60
 
61
  # Randomly choose what the new label values are, following the observed label frequencies.
62
- new_random_labels = list(choice(a=label_keys, size=num_new_labels, p=label_fractions))
63
 
64
  # Update the dataset so that the labels are randomized
65
  updated_dataset = dataset.map(randomize_labels, with_indices=True,
 
59
  randomize_subset = set(random.sample(range(0, NUM_EXAMPLES), num_new_labels))
60
 
61
  # Randomly choose what the new label values are, following the observed label frequencies.
62
+ new_random_labels = list(choice(a=label_list, size=num_new_labels, p=label_fractions))
63
 
64
  # Update the dataset so that the labels are randomized
65
  updated_dataset = dataset.map(randomize_labels, with_indices=True,