Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
@@ -3,7 +3,7 @@ from PIL import Image
|
|
3 |
from io import BytesIO
|
4 |
from transformers import AutoProcessor, OmDetTurboForObjectDetection
|
5 |
import base64
|
6 |
-
|
7 |
|
8 |
class EndpointHandler():
|
9 |
def __init__(self, path=""):
|
@@ -33,6 +33,8 @@ class EndpointHandler():
|
|
33 |
score_threshold=0.3,
|
34 |
nms_threshold=0.3,
|
35 |
)[0]
|
|
|
|
|
36 |
# Convert tensors to lists
|
37 |
serializable_results = {
|
38 |
'boxes': results['boxes'].tolist(),
|
|
|
3 |
from io import BytesIO
|
4 |
from transformers import AutoProcessor, OmDetTurboForObjectDetection
|
5 |
import base64
|
6 |
+
import logging
|
7 |
|
8 |
class EndpointHandler():
|
9 |
def __init__(self, path=""):
|
|
|
33 |
score_threshold=0.3,
|
34 |
nms_threshold=0.3,
|
35 |
)[0]
|
36 |
+
print(results)
|
37 |
+
logging.error()
|
38 |
# Convert tensors to lists
|
39 |
serializable_results = {
|
40 |
'boxes': results['boxes'].tolist(),
|