flan-t5-custom-handler / test_handler.py
MjolnirThor's picture
Initial commit: Add FLAN-T5 custom handler
f38a916
raw
history blame
448 Bytes
from handler import EndpointHandler
def test_handler():
# Initialize the handler
handler = EndpointHandler()
# Test with a simple prompt
test_input = {
"inputs": "Explain quantum computing in simple terms"
}
# Get the response
response = handler(test_input)
print("Input:", test_input["inputs"])
print("Output:", response["generated_text"])
if __name__ == "__main__":
test_handler()