Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -50,9 +50,9 @@ async def process_document_base64(request: Request):
|
|
50 |
if entities is not None:
|
51 |
for ent in entities:
|
52 |
if ent.get('type') is not None:
|
53 |
-
mention_text = ent.get('
|
54 |
-
normalised_values = ent.get('normalizedValue') if 'normalizedValue' in
|
55 |
-
document_entities[ent.get('type')] = {"mention_text":
|
56 |
|
57 |
return {"message_id":message_id , "filename":filename , "entities_data":document_entities}
|
58 |
|
|
|
50 |
if entities is not None:
|
51 |
for ent in entities:
|
52 |
if ent.get('type') is not None:
|
53 |
+
mention_text = ent.get('mentionText')
|
54 |
+
normalised_values = ent.get('normalizedValue') if 'normalizedValue' in ent else None
|
55 |
+
document_entities[ent.get('type')] = {"mention_text":mention_text,"normalizedValue":normalised_values}
|
56 |
|
57 |
return {"message_id":message_id , "filename":filename , "entities_data":document_entities}
|
58 |
|