Spaces:
Build error
Build error
fix: tackle None labels in multilabel
Browse files
src/synthetic_dataset_generator/apps/textcat.py
CHANGED
|
@@ -195,7 +195,7 @@ def generate_dataset(
|
|
| 195 |
set(
|
| 196 |
label.lower().strip()
|
| 197 |
for label in x
|
| 198 |
-
if label.lower().strip() in labels
|
| 199 |
)
|
| 200 |
)
|
| 201 |
else:
|
|
|
|
| 195 |
set(
|
| 196 |
label.lower().strip()
|
| 197 |
for label in x
|
| 198 |
+
if isinstance(label, str) and label.lower().strip() in labels
|
| 199 |
)
|
| 200 |
)
|
| 201 |
else:
|