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