Download tagger/api_models.py from CosVersin/e621-tagger-patch: direct link, hf CLI and curl.
- Browser
- Download file 718 Bytes
-
https://huggingface.co/CosVersin/e621-tagger-patch/resolve/main/tagger/api_models.py
- Command line
-
hf download hf://CosVersin/e621-tagger-patch/tagger/api_models.py
-
curl -L -o api_models.py https://huggingface.co/CosVersin/e621-tagger-patch/resolve/main/tagger/api_models.py
718 Bytes
| from typing import List, Dict | |
| from modules.api import models as sd_models | |
| from pydantic import BaseModel, Field | |
| class TaggerInterrogateRequest(sd_models.InterrogateRequest): | |
| model: str = Field( | |
| title='Model', | |
| description='The interrogate model used.' | |
| ) | |
| threshold: float = Field( | |
| default=0.35, | |
| title='Threshold', | |
| description='', | |
| ge=0, | |
| le=1 | |
| ) | |
| class TaggerInterrogateResponse(BaseModel): | |
| caption: Dict[str, float] = Field( | |
| title='Caption', | |
| description='The generated caption for the image.' | |
| ) | |
| class InterrogatorsResponse(BaseModel): | |
| models: List[str] = Field( | |
| title='Models', | |
| description='' | |
| ) | |