nhay103 commited on
Commit
a26e5f8
1 Parent(s): e5923d4

update app

Browse files
Files changed (1) hide show
  1. vietocr/translate.py +1 -1
vietocr/translate.py CHANGED
@@ -49,7 +49,7 @@ def process_image(image, image_height, image_min_width, image_max_width):
49
  w, h = img.size
50
  new_w, image_height = resize(w, h, image_height, image_min_width, image_max_width)
51
 
52
- img = img.resize((new_w, image_height), Image.ANTIALIAS)
53
 
54
  img = np.asarray(img).transpose(2,0, 1)
55
  img = img/255
 
49
  w, h = img.size
50
  new_w, image_height = resize(w, h, image_height, image_min_width, image_max_width)
51
 
52
+ img = img.resize((new_w, image_height), Image.Resampling.LANCZOS)
53
 
54
  img = np.asarray(img).transpose(2,0, 1)
55
  img = img/255