Spaces:
Sleeping
Sleeping
fix
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def annotateTriggers(line):
|
|
60 |
current_entity = label[2:]
|
61 |
token_labels.append((token, 'B', current_entity))
|
62 |
elif label.startswith('I-'):
|
63 |
-
if current_entity == '':
|
64 |
#raise ValueError(f"Invalid label sequence: {predicted_token_class}")
|
65 |
continue
|
66 |
token_labels[-1] = (token_labels[-1][0] + f" {token}", 'I', current_entity)
|
|
|
60 |
current_entity = label[2:]
|
61 |
token_labels.append((token, 'B', current_entity))
|
62 |
elif label.startswith('I-'):
|
63 |
+
if current_entity == '':
|
64 |
#raise ValueError(f"Invalid label sequence: {predicted_token_class}")
|
65 |
continue
|
66 |
token_labels[-1] = (token_labels[-1][0] + f" {token}", 'I', current_entity)
|