chanukool commited on
Commit
93ec2c3
·
1 Parent(s): 582db31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -8,7 +8,8 @@ ner=pipeline("ner",grouped_entities=True)
8
 
9
  def generate_entities(input):
10
  output= ner(input)
11
- output['entity']=output.pop('entity_group')
 
12
  return {"text":input,"entities":output}
13
 
14
 
 
8
 
9
  def generate_entities(input):
10
  output= ner(input)
11
+ for obj in output:
12
+ obj["entity"]=obj.pop("entity_group")
13
  return {"text":input,"entities":output}
14
 
15