LDanielBlueway commited on
Commit
e3584f4
·
verified ·
1 Parent(s): 841d06b

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -4
handler.py CHANGED
@@ -7,8 +7,8 @@ import logging
7
 
8
  class EndpointHandler():
9
  def __init__(self, path=""):
10
- self.processor = AutoProcessor.from_pretrained("Blueway/inference-endpoint-zero-shot-image-classification")
11
- self.model = OmDetTurboForObjectDetection.from_pretrained("Blueway/inference-endpoint-zero-shot-image-classification")
12
 
13
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
14
  """
@@ -33,8 +33,6 @@ class EndpointHandler():
33
  score_threshold=0.3,
34
  nms_threshold=0.3,
35
  )[0]
36
- print(results)
37
- logging.error(results)
38
  # Convert tensors to lists
39
  serializable_results = {
40
  'boxes': results['boxes'].tolist(),
 
7
 
8
  class EndpointHandler():
9
  def __init__(self, path=""):
10
+ self.processor = AutoProcessor.from_pretrained("Blueway/inference-endpoint-for-omdet-turbo-swin-tiny-hf")
11
+ self.model = OmDetTurboForObjectDetection.from_pretrained("Blueway/inference-endpoint-for-omdet-turbo-swin-tiny-hf")
12
 
13
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
14
  """
 
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(),