Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ if st.button("Highlight Geo-Entities"):
|
|
19 |
# Highlight geo-entities
|
20 |
highlighted_text = user_input
|
21 |
for ent in reversed(doc.ents):
|
22 |
-
if ent.label_ in [
|
23 |
highlighted_text = (
|
24 |
highlighted_text[:ent.start_char] +
|
25 |
f"**:green[{ent.text}]**" +
|
|
|
19 |
# Highlight geo-entities
|
20 |
highlighted_text = user_input
|
21 |
for ent in reversed(doc.ents):
|
22 |
+
if ent.label_ in ['FAC', 'ORG', 'LOC', 'GPE']: # GPE = Geopolitical Entity, LOC = Location
|
23 |
highlighted_text = (
|
24 |
highlighted_text[:ent.start_char] +
|
25 |
f"**:green[{ent.text}]**" +
|