File size: 600 Bytes
0026ff3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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() |