Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -100,7 +100,7 @@ def parse_text(text, prediction):
|
|
| 100 |
parsed_text = []
|
| 101 |
for p in prediction:
|
| 102 |
parsed_text.append(text[start:p["start"]])
|
| 103 |
-
parsed_text.append((p["word"], p["entity_group"], ENTITY_TO_COLOR[p["entity_group"], "#000"
|
| 104 |
start = p["end"]
|
| 105 |
parsed_text.append(text[start:])
|
| 106 |
return parsed_text
|
|
|
|
| 100 |
parsed_text = []
|
| 101 |
for p in prediction:
|
| 102 |
parsed_text.append(text[start:p["start"]])
|
| 103 |
+
parsed_text.append((p["word"], p["entity_group"], ENTITY_TO_COLOR[p["entity_group"], "#000"]))
|
| 104 |
start = p["end"]
|
| 105 |
parsed_text.append(text[start:])
|
| 106 |
return parsed_text
|