Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -98,7 +98,7 @@ def create_mask_dict(entities, additional_masks=None):
|
|
98 |
entity_counters = {}
|
99 |
|
100 |
for entity in entities:
|
101 |
-
|
102 |
if entity['word'] not in mask_dict:
|
103 |
if entity['entity_group'] not in entity_counters:
|
104 |
entity_counters[entity['entity_group']] = 1
|
|
|
98 |
entity_counters = {}
|
99 |
|
100 |
for entity in entities:
|
101 |
+
if entity['entity_group'] not in ['CARDINAL', 'EVENT', 'PERCENT', 'QUANTITY']:
|
102 |
if entity['word'] not in mask_dict:
|
103 |
if entity['entity_group'] not in entity_counters:
|
104 |
entity_counters[entity['entity_group']] = 1
|