Is it not possible to set image-to-text to task in my Inference Endpoint? And if the only way is to set the task to custom, is there a handler.py template for image-to-text somewhere?
I am trying to do the same. Is there any help here? If i put it to Image-Classification its asking for input_ids, which i am not able to provide neither ui nor through my request.
@ckandemir You are a legend!
Thank you so much.
My struggle was that I once I had cloned the repo (the blip model repo), I wasn’t able to generate the correct dependencies like the pythorch_bin and the weights needed for me to be able to then attach my custom handler.py and then create the inference endpoint.
Do you mind sharing how you were able to do the whole process ( sorry, I am a newby when it comes to this stuff, if you can’t tell… lol).
For the handler.py, I don’t want the payload to be a list of images, I just want to be able to attach 1 image to be processed…
Anyway, you’ve been a lot of help already, I would totally understand if this is too much to ask
@pdichone basically when you are creating a custom endpoint handler your are reconfiguring the forward method to align with the generate function of the model you are using behind the endpoint, and thus tweaking the payload accordingly to the underlying mode’s accepted input type. @philschmid please correct me if I am wrong
I would recommend to follow this documentation here to build couple random endpoints to get a hold on it. Then you can easily spot whats going on in the logs when you deploy your endpoints.
You can tweak this code here to serve your use case