from handler import EndpointHandler | |
if __name__ == "__main__": | |
# init handler | |
my_handler = EndpointHandler(path=".") | |
# prepare sample payload | |
messages = [ | |
{"role": "user", "content": "Apa sentimen dari kalimat berikut ini?\nKalimat: Buku ini sangat membosankan.\nJawaban: "}, | |
] | |
# test the handler | |
pred=my_handler.pipeline(messages) | |
# show results | |
print(pred) | |