YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Fork of SmilingWolf/wd-swinv2-tagger-v3 for a image-captioning task on 🤗Inference endpoint.

This repository implements a custom task for image-captioning for 🤗 Inference Endpoints.

To use deploy this model a an Inference Endpoint you have to select Custom as task to use the handler.py file. -> double check if it is selected

Setup

  1. Enter virtual environment source venv/bin/activate (deactivate to exit).
  2. Install the requirements pip install -r requirements.txt.
  3. Run the server python3 server.py.
  4. Make request to http://127.0.0.1:5000/ with the payload below.

Token

To secure it with token, add env SECRET_TOKEN and set the value. It must be included in root of json with each request:

{
  "secret_token": "your_secret_token"
}

Request examples

Request payload with url to media

{
  "inputs": { "url": "https://example.com/image.jpg" }
}

Request payload with base64 to media

{
  "inputs": { "base64": "base64_string" }
}

Response examples

Success response

{
  "caption": "1girl, ass, solo, feet, nail polish, toenail polish, pussy, toes, toenails, barefoot, mole on ass, pantyhose, hair bun, soles, looking back, anus, see-through legwear, realistic, looking at viewer, all fours, brown hair, see-through, underwear, brown eyes, couch, from behind, uncensored, sleeveless, no panties, asian, mole, panties, female pubic hair, foreshortening, shirt, gusset, panties under pantyhose"
}

Error response

{
  "caption": "",
  "error": "Unexpected error happened."
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.