File size: 608 Bytes
093705f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
from handler import EndpointHandler
# init handler
my_handler = EndpointHandler(path=".")
# prepare sample payload
payload = {"inputs": { "context": """<body>
<h1>Company Information</h1>
<p>Welcome to the official website of <strong>ExampleCorp</strong>.</p>
<h2>About Us</h2>
<p>ExampleCorp is a leading provider of innovative tech solutions.</p>
<h2>Contact Information</h2>
<p>Email: contact@example.com</p>
<p>Phone: +1-800-555-1234</p>
</body>""", "question": "What is the email address?"}}
# test the handler
pred=my_handler(payload)
# show results
print("pred", pred)
|