blip-vqa-base / handler-test.py
luisresende13's picture
update handler.py
60f69ac
raw
history blame
416 Bytes
# 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)