sam-vit-base / test_handler.py
Ubuntu
add custom handler
c2fbc3b
raw
history blame contribute delete
374 Bytes
from handler import EndpointHandler
# init handler
my_handler = EndpointHandler(path=".")
# prepare sample payload
payload = {"inputs": "I am quite excited how this will turn out", "imageUrl": "https://res.cloudinary.com/dvfgdnfzd/image/upload/v1693510414/nvae1t0lvgzavfkgb45j.png"}
# test the handler
payload=my_handler(payload)
# show results
print("payload", payload)