Image captioning using image url only without blob?
Hi!, how can I use image captioning when I only have image url? the constraint is I can’t use function/method to open an image (blob) and using curl.here’s what I did (this works because it’s an image blob):curl https://api-inference.huggingface.co/models/Salesforce/blip-image-captioning-large \
        -X POST \
        --data-binary '@pilates.jpg' \
        -H "Authorization: Bearer ${HF_API_TOKEN}"
# [{"generated_text": "there is a man doing a handstand on a rock in the woods"}]But, is there any way to do a request where I only have image url?
2023-10-19T04:17:41Z
@nappystockIn my inference endpoint I got it working by downloading the image from the url then converting it to bytes  then sending it to the model:huggingface.cockandemir/blip-image-captioning-large-inference · Hugging FaceWe’re on a journey to advance and democratize artificial intelligence through open source and open science.
2023-10-19T04:19:03Z
@ckandemirI saw it used a py script where i have to run it. What I mean is I can only use curl and image url only (no blob, no image opening (ie.with open("/content/demo.jpg", "rb") as image_file...)
2023-10-19T04:52:08Z
If your underlying model accepts jpg in the payload you can try to download it directly  with:curl https://api-inference.huggingface.co/models/Salesforce/blip-image-captioning-large \
     -X POST \
     --data-binary "$(curl -s [IMAGE_URL])"\
     -H "Authorization: Bearer ${HF_API_TOKEN}"