Closed jbdel closed 2 years ago
You can probably pass the image as a base64 encoded version of the binary.
im = base64.b64encode(im).decode("utf-8")
inference(im, params={...})
The reason is when sending raw bytes, you cannot send parameters along (since the payload is binary it's not JSON).
@osanseviero maybe for confirmation ?
@Narsil solution worked.
Thanks for helping,
JB
Hello,
I'm trying inference-api with this a image-to-text model: ViLMedic/rrg_baseline.
This code works well:
I receive two captions: perfect!
If i work with bytes (i.e. file from computer):
then i just get one sentence, its like params is discarded in this case. How could I do ?
Thanks,