hantech commited on
Commit
1e988ab
β€’
1 Parent(s): 347d930

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -35,7 +35,7 @@ def query(doc, labels):
35
  'question': question,
36
  'context': doc
37
  }
38
- print(QA_input)
39
  res= nlp(QA_input)
40
  print(res)
41
  value = res['answer']
@@ -72,7 +72,13 @@ def inference(filepath, lang, labels):
72
  max_y = max(tl[1], tr[1], br[1], bl[1])
73
  max_y = min(height-1, max_y)
74
  # crop the region of interest (ROI)
75
-
 
 
 
 
 
 
76
  cropped_image = img[min_y:max_y,min_x:max_x] # crop the image
77
  cropped_image = Image.fromarray(cropped_image)
78
  out = recognitor.predict(cropped_image)
 
35
  'question': question,
36
  'context': doc
37
  }
38
+
39
  res= nlp(QA_input)
40
  print(res)
41
  value = res['answer']
 
72
  max_y = max(tl[1], tr[1], br[1], bl[1])
73
  max_y = min(height-1, max_y)
74
  # crop the region of interest (ROI)
75
+ print(min_x)
76
+ print(min_y)
77
+ print(max_x)
78
+ print(max_y)
79
+
80
+
81
+
82
  cropped_image = img[min_y:max_y,min_x:max_x] # crop the image
83
  cropped_image = Image.fromarray(cropped_image)
84
  out = recognitor.predict(cropped_image)