File size: 416 Bytes
60f69ac |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# pip install -r requirements.txt
from handler import EndpointHandler
# init handler
my_handler = EndpointHandler(path=".")
# prepare sample payload
payload = {
"inputs": {
"question": "What's in the image?",
"image": "https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg"
}
}
# test the handler
result = my_handler(payload)
# show results
print("result:", result) |