Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)
|