Spaces:
Runtime error
Runtime error
aldan.creo
commited on
Commit
·
b448895
1
Parent(s):
1e83e3d
WIP
Browse files
app.py
CHANGED
@@ -58,11 +58,10 @@ def filter_imgs_by_label(x):
|
|
58 |
"""
|
59 |
Filter out the images that have label -1
|
60 |
"""
|
61 |
-
print(f'label: {x["label"]}')
|
62 |
return x["label"] in artifact_categories
|
63 |
|
64 |
|
65 |
-
|
66 |
dataset = Dataset.from_generator(
|
67 |
partial(gen_from_iterable_dataset, it_dataset), features=it_dataset.features
|
68 |
)
|
|
|
58 |
"""
|
59 |
Filter out the images that have label -1
|
60 |
"""
|
|
|
61 |
return x["label"] in artifact_categories
|
62 |
|
63 |
|
64 |
+
it_dataset = it_dataset.take(1000).filter(filter_imgs_by_label)
|
65 |
dataset = Dataset.from_generator(
|
66 |
partial(gen_from_iterable_dataset, it_dataset), features=it_dataset.features
|
67 |
)
|