Update handler.py
Browse files19 unmodified lines20212223242526272829303117 unmodified lines4950515253545519 unmodified linesself.model = YOLO("./best.pt")def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:inputs = data.get("inputs")isurl = inputs.get("isurl")path = inputs.get("path")print(path)# path = "http://10.10.2.100/cam-lo.jpg"model = self.model########################### Load Image #################################if(isurl): # for url set isurl = 1print("checkpoint 2-1")17 unmodified lines# t-shirts-detector/1# mainmodel/2#result = self.CLIENT.infer(path, model_id="mainmodel/2")result = model(img)#annotated_frame = result[0].plot()detections = result[0].boxes#print(result[0].boxes.xyxy)19 unmodified lines2021222324252627282930313233343517 unmodified lines5354555657585919 unmodified linesself.model = YOLO("./best.pt")def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:inputs = data.get("inputs")print("in call")isurl = inputs.get("isurl")print("in isurl")path = inputs.get("path")print("is path")print(path)# path = "http://10.10.2.100/cam-lo.jpg"########################### Load Image #################################if(isurl): # for url set isurl = 1print("checkpoint 2-1")17 unmodified lines# t-shirts-detector/1# mainmodel/2#result = self.CLIENT.infer(path, model_id="mainmodel/2")result = self.model(img)#annotated_frame = result[0].plot()detections = result[0].boxes#print(result[0].boxes.xyxy)
handler.py+6-2