oscarfu0501 commited on
Commit
c730cc4
1 Parent(s): ee790b1

Upload handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -16,7 +16,7 @@ class EndpointHandler():
16
  path = inputs.get("path")
17
  key = inputs.get("key")
18
  ########################### Load Image #################################
19
- self.CLIENT = InferenceHTTPClient(
20
  api_url="https://detect.roboflow.com",
21
  api_key=key
22
  )
@@ -35,7 +35,7 @@ class EndpointHandler():
35
  # clothing-segmentation-dataset/1
36
  # t-shirts-detector/1
37
  # mainmodel/2
38
- result = self.CLIENT.infer(path, model_id="mainmodel/2")
39
  detections = sv.Detections.from_inference(result)
40
  # print(detections)
41
  ###########################################################################
 
16
  path = inputs.get("path")
17
  key = inputs.get("key")
18
  ########################### Load Image #################################
19
+ CLIENT = InferenceHTTPClient(
20
  api_url="https://detect.roboflow.com",
21
  api_key=key
22
  )
 
35
  # clothing-segmentation-dataset/1
36
  # t-shirts-detector/1
37
  # mainmodel/2
38
+ result = CLIENT.infer(path, model_id="mainmodel/2")
39
  detections = sv.Detections.from_inference(result)
40
  # print(detections)
41
  ###########################################################################