Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -168,7 +168,7 @@ def extract_entities_with_stanza(text, chunk_size=1000):
|
|
168 |
doc = nlp(chunk)
|
169 |
for ent in doc.ents:
|
170 |
#entities.append({"text": ent.text, "type": ent.type})
|
171 |
-
|
172 |
|
173 |
#return entities
|
174 |
if not entities:
|
|
|
168 |
doc = nlp(chunk)
|
169 |
for ent in doc.ents:
|
170 |
#entities.append({"text": ent.text, "type": ent.type})
|
171 |
+
entities.append(f"π **Entity**: \"{ent.text}\" | **Type**: {ent.type}") # β
Format output
|
172 |
|
173 |
#return entities
|
174 |
if not entities:
|