from handler import EndpointHandler from PIL import Image import base64 # init handler my_handler = EndpointHandler(path=".") # prepare sample payload image = Image.open("test.png") payload = {"image": base64.b64encode(image)} pred=my_handler(payload)