saattrupdan
commited on
Commit
•
f4175b5
1
Parent(s):
33bf3bb
fix: Ensure that the app works in Python 3.8
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def main():
|
|
21 |
|
22 |
def ner(text):
|
23 |
output: list[dict] = pipe(text)
|
24 |
-
output = [{'entity': dct['entity_group']}
|
25 |
print(output)
|
26 |
return {"text": text, "entities": output}
|
27 |
|
|
|
21 |
|
22 |
def ner(text):
|
23 |
output: list[dict] = pipe(text)
|
24 |
+
output = [{**{'entity': dct['entity_group']}, **dct} for dct in output]
|
25 |
print(output)
|
26 |
return {"text": text, "entities": output}
|
27 |
|