Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
@@ -17,6 +17,7 @@ class EndpointHandler:
|
|
17 |
path = inputs.get("path")
|
18 |
key = inputs.get("key")
|
19 |
########################### Load Image #################################
|
|
|
20 |
CLIENT = InferenceHTTPClient(api_url="https://detect.roboflow.com", api_key=key)
|
21 |
print("get client")
|
22 |
if isurl: # for url set isurl = 1
|
@@ -32,9 +33,10 @@ class EndpointHandler:
|
|
32 |
# can try:
|
33 |
# clothing-segmentation-dataset/1
|
34 |
# t-shirts-detector/1
|
|
|
35 |
# mainmodel/2
|
36 |
print("start model detection")
|
37 |
-
result = CLIENT.infer(path, model_id="
|
38 |
detections = sv.Detections.from_inference(result)
|
39 |
# print(detections)
|
40 |
###########################################################################
|
|
|
17 |
path = inputs.get("path")
|
18 |
key = inputs.get("key")
|
19 |
########################### Load Image #################################
|
20 |
+
print("load image")
|
21 |
CLIENT = InferenceHTTPClient(api_url="https://detect.roboflow.com", api_key=key)
|
22 |
print("get client")
|
23 |
if isurl: # for url set isurl = 1
|
|
|
33 |
# can try:
|
34 |
# clothing-segmentation-dataset/1
|
35 |
# t-shirts-detector/1
|
36 |
+
# clothing-detection-s4ioc/6
|
37 |
# mainmodel/2
|
38 |
print("start model detection")
|
39 |
+
result = CLIENT.infer(path, model_id="clothing-detection-s4ioc/6")
|
40 |
detections = sv.Detections.from_inference(result)
|
41 |
# print(detections)
|
42 |
###########################################################################
|