from handler import EndpointHandler # Initialize the handler with the local model path my_handler = EndpointHandler(path=".") # Example payload data = { "inputs": [ { "id": "1", "chunk": "Prior to restoration work performed between 1990 and 2001, Leaning Tower of Pisa leaned at an angle of 5.5 degrees, but the tower now leans at about 3.99 degrees. This means the top of the tower is displaced horizontally 3.9 meters (12 ft 10 in) from the center.", "title": "Leaning Tower of Pisa", "date": "2023-01-01", }, { "id": "2", "chunk": "Prior to restoration work performed between 1990 and 2001, Leaning Tower of Pisa leaned at an angle of 5.5 degrees, but the tower now leans at about 3.99 degrees. This means the top of the tower is displaced horizontally 3.9 meters (12 ft 10 in) from the center.", "title": "Leaning Tower of Pisa", "date": "2023-01-02", }, ] } # Call the handler and print the output output = my_handler(data) print(output)