sotirios-slv commited on
Commit
20e92e5
1 Parent(s): 1654918

Reformatting entities for display (again)

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,10 +23,10 @@ def get_named_entities(ocr_text: str):
23
 
24
  for token in sentence:
25
  for entity in token.get_spans("ner"):
26
- entity = str(entity).split(":")[1]
27
  entities.append(entity)
28
 
29
- entities = "/n".join(entities)
30
 
31
  print("ENTITIES ", entities)
32
  return entities
 
23
 
24
  for token in sentence:
25
  for entity in token.get_spans("ner"):
26
+ entity = str(entity)
27
  entities.append(entity)
28
 
29
+ entities = "\n".join(entities)
30
 
31
  print("ENTITIES ", entities)
32
  return entities