Spaces:
Sleeping
Sleeping
Changed variables names.
Browse files
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=
|
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,
|