Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,8 @@ WIDTH = 640
|
|
24 |
|
25 |
def detect(image):
|
26 |
width, height = image.size
|
27 |
-
ratio = float(WIDTH) / float(
|
28 |
-
new_h =
|
29 |
|
30 |
image = image.resize((WIDTH, new_h), Image.Resampling.LANCZOS)
|
31 |
|
|
|
24 |
|
25 |
def detect(image):
|
26 |
width, height = image.size
|
27 |
+
ratio = float(WIDTH) / float(width)
|
28 |
+
new_h = height * ratio
|
29 |
|
30 |
image = image.resize((WIDTH, new_h), Image.Resampling.LANCZOS)
|
31 |
|