flan-t5-custom-handler / test_handler.py
MjolnirThor's picture
Initial commit: Add FLAN-T5 custom handler
0026ff3
raw
history blame
600 Bytes
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()