Downloads · 30 days
0
social-rise/wd-swinv2-tagger-v3
wd-swinv2-tagger-v3 is a machine learning model from social-rise. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository implements a custom task for image-captioning for 🤗 Inference Endpoints.
Downloads · 30 days
0
Access
Public
Updated Oct 12, 2024
Repo size
—
Likes
1
Public
Click a slice to open those files.
.py7.1 KB · 68%
From the Hugging Face model README
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
source venv/bin/activate (deactivate to exit).pip install -r requirements.txt.python3 server.py.http://127.0.0.1:5000/ with the payload below.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"
}
{
"inputs": { "url": "https://example.com/image.jpg" }
}
{
"inputs": { "base64": "base64_string" }
}
{
"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"
}
{
"caption": "",
"error": "Unexpected error happened."
}