LDanielBlueway commited on
Commit
1711b20
·
verified ·
1 Parent(s): f021aff

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +3 -3
handler.py CHANGED
@@ -24,9 +24,9 @@ class EndpointHandler():
24
  image = Image.open(BytesIO(base64.b64decode(inputs['image'])))
25
 
26
  # run prediction one image wit provided candiates
27
- inputs = processor(image, text=inputs["candidates"], return_tensors="pt")
28
- outputs = model(**inputs)
29
- results = processor.post_process_grounded_object_detection(
30
  outputs,
31
  classes=classes,
32
  target_sizes=[image.size[::-1]],
 
24
  image = Image.open(BytesIO(base64.b64decode(inputs['image'])))
25
 
26
  # run prediction one image wit provided candiates
27
+ inputs = self.processor(image, text=inputs["candidates"], return_tensors="pt")
28
+ outputs = self.model(**inputs)
29
+ results = self.processor.post_process_grounded_object_detection(
30
  outputs,
31
  classes=classes,
32
  target_sizes=[image.size[::-1]],