hantech commited on
Commit
6d4cdc0
β€’
1 Parent(s): 1e3ff78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -87,7 +87,9 @@ def inference(filepath, lang, labels):
87
  cropped_image = img[min_y:max_y,min_x:max_x] # crop the image
88
  cropped_image = Image.fromarray(cropped_image)
89
  out = recognitor.predict(cropped_image)
90
- texts = texts + '\t' + acronym_correction(out)
 
 
91
  result = query(texts, labels)
92
  jsonText = json.dumps(result)
93
  im = PIL.Image.open(filepath)
 
87
  cropped_image = img[min_y:max_y,min_x:max_x] # crop the image
88
  cropped_image = Image.fromarray(cropped_image)
89
  out = recognitor.predict(cropped_image)
90
+ corrected_out = acronym_correction(out)
91
+ print('correct from: '+ out + ' to: '+corrected_out)
92
+ texts = texts + '\t' + corrected_out
93
  result = query(texts, labels)
94
  jsonText = json.dumps(result)
95
  im = PIL.Image.open(filepath)