from handler import EndpointHandler | |
def test_flan_t5(): | |
# Initialize handler | |
handler = EndpointHandler() | |
# Test cases | |
test_inputs = [ | |
"Explain quantum computing in simple terms", | |
"Translate 'Hello, how are you?' to French", | |
"Write a short story about a magical forest" | |
] | |
# Test each input | |
for text in test_inputs: | |
print("\n" + "="*50) | |
print(f"Input text: {text}") | |
result = handler({"inputs": text}) | |
print("Generated response:", result) | |
print("="*50) | |
if __name__ == "__main__": | |
test_flan_t5() |