Fix `imgsz` value when not provided in payload
#24
by
alvarobartt
HF staff
- opened
- handler.py +1 -1
- requirements.txt +2 -1
handler.py
CHANGED
@@ -199,7 +199,7 @@ class EndpointHandler:
|
|
199 |
|
200 |
w, h = image.size
|
201 |
if image_size is None:
|
202 |
-
imgsz =
|
203 |
else:
|
204 |
imgsz = [image_size.get("h", h), image_size.get("w", w)]
|
205 |
|
|
|
199 |
|
200 |
w, h = image.size
|
201 |
if image_size is None:
|
202 |
+
imgsz = [h, w]
|
203 |
else:
|
204 |
imgsz = [image_size.get("h", h), image_size.get("w", w)]
|
205 |
|
requirements.txt
CHANGED
@@ -4,4 +4,5 @@ opencv-python
|
|
4 |
opencv-python-headless
|
5 |
supervision==0.18.0
|
6 |
timm
|
7 |
-
|
|
|
|
4 |
opencv-python-headless
|
5 |
supervision==0.18.0
|
6 |
timm
|
7 |
+
transformers<=4.49.0
|
8 |
+
ultralytics==8.3.70
|