Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def generate_ner_html(text, entities):
|
|
49 |
|
50 |
for entity in all_entities:
|
51 |
start, end, word, entity_type = entity["start"], entity["end"], entity["word"], entity["entity"]
|
52 |
-
color = ENTITY_COLORS.get(entity_type, ENTITY_COLORS[
|
53 |
|
54 |
# เพิ่มข้อความก่อน Entity
|
55 |
annotated_text += text[last_idx:start]
|
|
|
49 |
|
50 |
for entity in all_entities:
|
51 |
start, end, word, entity_type = entity["start"], entity["end"], entity["word"], entity["entity"]
|
52 |
+
color = ENTITY_COLORS.get(entity_type, ENTITY_COLORS[entity_type])
|
53 |
|
54 |
# เพิ่มข้อความก่อน Entity
|
55 |
annotated_text += text[last_idx:start]
|