MCPcopy Create free account
hub / github.com/Lightning-AI/LitServe / encode_response

Method encode_response

tests/unit/test_schema.py:37–39  ·  view source on GitHub ↗
(self, numpy_image)

Source from the content-addressed store, hash-verified

35 return self.model(x)
36
37 def encode_response(self, numpy_image) -> ImageOutput:
38 output = Image.fromarray(np.uint8(numpy_image)).convert("RGB")
39 return ImageOutput(image=output)
40
41
42def test_image_input_output(tmpdir):

Callers

nothing calls this directly

Calls 1

ImageOutputClass · 0.90

Tested by

no test coverage detected