sarim commited on
Commit
767cd3f
·
1 Parent(s): fd8da39

currency code

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -41,15 +41,15 @@ def read_root(image_file: bytes = File(...)):
41
  question_1 = "What is the Total amount?"
42
  question_2 = "What is the VAT amount?"
43
  question_3 = "What is the Date?"
44
- question_4 = "What is the tax amount"
45
  output_1 = pipe(image, question_1)
46
  output_2 = pipe(image, question_2)
47
  output_3 = pipe(image, question_3)
48
  output_4 = pipe(image, question_4)
49
 
50
  response = {}
51
- response['total amount'] = output_1[0]['answer']
52
- response['total vat'] = output_2[0]['answer']
53
  response['date'] = output_3[0]['answer']
54
- response['vat'] = output_4[0]['answer']
55
  return response
 
41
  question_1 = "What is the Total amount?"
42
  question_2 = "What is the VAT amount?"
43
  question_3 = "What is the Date?"
44
+ question_4 = "What is the currency code?"
45
  output_1 = pipe(image, question_1)
46
  output_2 = pipe(image, question_2)
47
  output_3 = pipe(image, question_3)
48
  output_4 = pipe(image, question_4)
49
 
50
  response = {}
51
+ response['totalAmount'] = output_1[0]['answer']
52
+ response['totalVat'] = output_2[0]['answer']
53
  response['date'] = output_3[0]['answer']
54
+ response['currencyCode'] = output_4[0]['answer']
55
  return response