Spaces:
Runtime error
Runtime error
jpjpjpjpjp
commited on
Commit
•
53e95b0
1
Parent(s):
05ef389
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def analyze_image(image, question):
|
|
26 |
response = requests.request("POST", url, headers=headers, data=payload)
|
27 |
|
28 |
jsonresponse = json.loads(response.text)
|
29 |
-
return "Answer: {0} \
|
30 |
|
31 |
description = "Hyland Demo for Document Question & Answering , fine-tuned on DocVQA (document visual question answering). To use it, simply upload your image and type a question and click 'submit', or click one of the examples to load them. Read more at the links below."
|
32 |
title = "DocVQA"
|
|
|
26 |
response = requests.request("POST", url, headers=headers, data=payload)
|
27 |
|
28 |
jsonresponse = json.loads(response.text)
|
29 |
+
return "Answer: {0} \nConfidence: {1}".format(jsonresponse['body'][0]['result'][0]['answer'][0], jsonresponse['body'][0]['result'][0]['score'])
|
30 |
|
31 |
description = "Hyland Demo for Document Question & Answering , fine-tuned on DocVQA (document visual question answering). To use it, simply upload your image and type a question and click 'submit', or click one of the examples to load them. Read more at the links below."
|
32 |
title = "DocVQA"
|