Spaces:
Runtime error
Runtime error
VaAishvarR
commited on
Commit
•
d930d18
1
Parent(s):
e065fd2
Update app.py
Browse files
app.py
CHANGED
@@ -84,7 +84,7 @@ def adr_predict(x):
|
|
84 |
start = entity['start']
|
85 |
end = entity['end']
|
86 |
word = entity['word'].replace("##", "")
|
87 |
-
color = entity_colors
|
88 |
|
89 |
htext += f"{x[prev_end:start]}<mark style='background-color:{color};'>{word}</mark>"
|
90 |
prev_end = end
|
|
|
84 |
start = entity['start']
|
85 |
end = entity['end']
|
86 |
word = entity['word'].replace("##", "")
|
87 |
+
color = entity_colors.get(entity['entity_group'], 'black')
|
88 |
|
89 |
htext += f"{x[prev_end:start]}<mark style='background-color:{color};'>{word}</mark>"
|
90 |
prev_end = end
|