sarim commited on
Commit
fd8da39
·
1 Parent(s): 90ad422
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -39,9 +39,9 @@ def read_root(image_file: bytes = File(...)):
39
  image = Image.open(BytesIO(image_file))
40
 
41
  question_1 = "What is the Total amount?"
42
- question_2 = "What is Total VAT amount?"
43
  question_3 = "What is the Date?"
44
- question_4 = "What is the total amount currency?"
45
  output_1 = pipe(image, question_1)
46
  output_2 = pipe(image, question_2)
47
  output_3 = pipe(image, question_3)
@@ -49,7 +49,7 @@ def read_root(image_file: bytes = File(...)):
49
 
50
  response = {}
51
  response['total amount'] = output_1[0]['answer']
52
- response['toal vat'] = output_2[0]['answer']
53
  response['date'] = output_3[0]['answer']
54
- response['currency'] = output_4[0]['answer']
55
  return response
 
39
  image = Image.open(BytesIO(image_file))
40
 
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)
 
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