File size: 579 Bytes
9957835 3835a42 9957835 3835a42 8d01c7e 3835a42 8d01c7e 3835a42 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from pipeline import PreTrainedPipeline
# init handler
my_handler = PreTrainedPipeline(path=".")
doc = [
"The Half Moon is a public house and music venue in Putney, London. It is one of the city's longest running live music venues, and has hosted live music every night since 1963.",
"The pub is on the south side of the Lower Richmond road, in the London Borough of Wandsworth.",
]
PARAGRAPH_DELIMITER = "\n\n"
doc_string = PARAGRAPH_DELIMITER.join(doc)
# prepare sample payload
payload = doc_string
prediction = my_handler(payload)
# show results
print(prediction)
|