Passing multiple(variable) input images to the handler via curl
Hello,
I am trying to pass multiple images using a custom handler that I build. I understand that in order to pass a single image during inference I have to give the command as follows: curl localhost:8080/predictions/
On looking online, I found that in order to give multiple images, I need to give it as an array as follows: curl localhost:8080/predictions/
Any thoughts regarding how I can pass a variable number of images to the handler using an array?
Thanks
@anustupc: Please refer to the following comment :
https://github.com/pytorch/serve/issues/529#issuecomment-658012913
Hi @harshbafna , Thanks for your reply. I understand that it can be done by giving a different key value for each image. I was wondering if it is possible to pass everything as elements of one list. If not, the solution as stated right now should work for me (for now).
@anustupc
you could use the -d flag of curl command as follows:
-d '["data1", "data2", "data3"]'
Thanks for your suggestion @harshbafna . I haven't really tested the -d option but I can make do with using multiple names with -F. I think we can close this for now and if need be reopen it later.