from handler import EndpointHandler | |
# init handler | |
my_handler = EndpointHandler() | |
# prepare sample payload | |
non_holiday_payload = { | |
"inputs": "I am quite excited how this will turn out", | |
"parameters": {"mode": "text"}, | |
} | |
# test the handler | |
non_holiday_pred = my_handler(non_holiday_payload) | |
print(non_holiday_pred) | |
non_holiday_payload = { | |
"inputs": "https://image.momoxfashion.com/Marc-O-Polo-i402d2w-0-detail", | |
"parameters": {"mode": "image"}, | |
} | |
non_holiday_pred = my_handler(non_holiday_payload) | |
print(non_holiday_pred) | |