JosephTK commited on
Commit
f158078
1 Parent(s): 64377f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -27,7 +27,7 @@ def detect(image):
27
  ratio = float(WIDTH) / float(width)
28
  new_h = height * ratio
29
 
30
- image = image.resize((WIDTH, new_h), Image.Resampling.LANCZOS)
31
 
32
  inputs = image_processor(images=image, return_tensors="pt")
33
  outputs = model(**inputs)
 
27
  ratio = float(WIDTH) / float(width)
28
  new_h = height * ratio
29
 
30
+ image = image.resize((int(WIDTH), int(new_h)), Image.Resampling.LANCZOS)
31
 
32
  inputs = image_processor(images=image, return_tensors="pt")
33
  outputs = model(**inputs)