File size: 542 Bytes
98660fb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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)
|