Spaces:
Sleeping
Sleeping
fixing category retrival
Browse files
model.py
CHANGED
|
@@ -54,7 +54,8 @@ class BertClassifier(LabelStudioMLBase):
|
|
| 54 |
if not choices_tag:
|
| 55 |
raise ValueError("No Choices tag found in label config")
|
| 56 |
|
| 57 |
-
|
|
|
|
| 58 |
if not self.categories:
|
| 59 |
raise ValueError("No categories found in label config")
|
| 60 |
|
|
|
|
| 54 |
if not choices_tag:
|
| 55 |
raise ValueError("No Choices tag found in label config")
|
| 56 |
|
| 57 |
+
# Extract labels from the choices tag
|
| 58 |
+
self.categories = choices_tag.get('labels', [])
|
| 59 |
if not self.categories:
|
| 60 |
raise ValueError("No categories found in label config")
|
| 61 |
|