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)