from handler import EndpointHandler | |
# init handler | |
my_handler = EndpointHandler(path=".") | |
# prepare sample payload | |
example = { | |
"inputs": [ | |
{"id": 1, "speaker": "Alice", "text": "How much is the fish?" }, | |
{"id": 2, "speaker": "Bob", "text": "I have no idea, ask Alice" } | |
], | |
"parameters": { | |
"speaker_1_min_num_words": 5, | |
"speaker_2": "Bob" | |
} | |
} | |
# test the handler | |
print(my_handler(example)) | |