File size: 747 Bytes
b208d2e fbe1af4 b208d2e fbe1af4 5038a86 b208d2e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from handler import EndpointHandler
import pandas as pd
# init handler
response_model_handler = EndpointHandler()
# prepare sample payload
payload = {'inputs': {"instruction": "What are some ways to stay energized throughout the day?",
"response": "Drink lots of coffee!"}}
# test the handler
pred=response_model_handler(payload)
print(pred)
payload = {'inputs': [{"instruction": "What are some ways to stay energized throughout the day?",
"response": "Drink lots of coffee!"},
{"instruction": "What are some ways to stay energized throughout the day?",
"response": "Buy lots of sailboats!"}]}
# test the handler
pred=response_model_handler(payload)
print(pred) |