File size: 1,017 Bytes
78c5cad 301404d d634727 301404d 26334b8 d634727 301404d 78c5cad 301404d 840bd63 301404d d634727 301404d d634727 301404d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
---
tags:
- vision
- image-to-text
- endpoints-template
inference: false
pipeline_tag: image-to-text
base_model: Salesforce/blip-image-captioning-base
library_name: generic
---
# Fork of [Salesforce/blip-image-captioning-base](https://huggingface.co/Salesforce/blip-image-captioning-base) for a `image-to-text` Inference endpoint.
> Inspired by https://huggingface.co/sergeipetrov/blip_captioning
This repository implements a `custom` task for `image-to-text` for 🤗 Inference Endpoints to allow image capturing.
The code for the customized pipeline is in the handler.py.
To use deploy this model an Inference Endpoint you have to select `Custom` as task to use the `handler.py` file.
### expected Request payload
Image to be labeled as binary.
#### CURL
```
curl URL \
-X POST \
--data-binary @car.png \
-H "Content-Type: image/png"
```
#### Python
```python
requests.post(ENDPOINT_URL, headers={"Content-Type": "image/png"}, data=open("car.png", 'rb').read()).json()
``` |