elshehawy commited on
Commit
8d1089d
·
1 Parent(s): 4c02633

enhance the final message appearance

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -45,7 +45,11 @@ def find_orgs(sentence, choice):
45
  if choice=='GPT':
46
  return get_completion(prompt)
47
  else:
48
- return pipe(sentence)
 
 
 
 
49
 
50
 
51
  example = """
 
45
  if choice=='GPT':
46
  return get_completion(prompt)
47
  else:
48
+ message = 'Organizations are:'
49
+ for ent in pipe(sentence):
50
+ if ent['entity_group'] == 'ORG':
51
+ message += f'\n- {ent["word"]}'
52
+ return message
53
 
54
 
55
  example = """