Update README.md
Browse files
README.md
CHANGED
|
@@ -54,7 +54,7 @@ from inference_tagger_standalone import Tagger
|
|
| 54 |
|
| 55 |
tagger = Tagger(
|
| 56 |
checkpoint_path="tagger_proto.safetensors",
|
| 57 |
-
vocab_path="
|
| 58 |
device="cuda",
|
| 59 |
)
|
| 60 |
|
|
@@ -71,7 +71,7 @@ tags = tagger.predict("https://example.com/image.jpg", threshold=0.35)
|
|
| 71 |
# top-30 tags, pretty output
|
| 72 |
python inference_tagger_standalone.py \
|
| 73 |
--checkpoint tagger_proto.safetensors \
|
| 74 |
-
--vocab
|
| 75 |
--images photo.jpg https://example.com/image.jpg \
|
| 76 |
--topk 30
|
| 77 |
|
|
@@ -89,7 +89,7 @@ pip install fastapi uvicorn jinja2 aiofiles
|
|
| 89 |
|
| 90 |
python tagger_ui_server.py \
|
| 91 |
--checkpoint tagger_proto.safetensors \
|
| 92 |
-
--vocab
|
| 93 |
--port 7860
|
| 94 |
# → open http://localhost:7860
|
| 95 |
```
|
|
@@ -99,7 +99,7 @@ python tagger_ui_server.py \
|
|
| 99 |
| File | Description |
|
| 100 |
|---|---|
|
| 101 |
| `*.safetensors` | Model weights (bfloat16) |
|
| 102 |
-
| `
|
| 103 |
| `inference_tagger_standalone.py` | Self-contained inference script (no `transformers` dep) |
|
| 104 |
| `tagger_ui_server.py` | FastAPI + Jinja2 web UI server |
|
| 105 |
|
|
|
|
| 54 |
|
| 55 |
tagger = Tagger(
|
| 56 |
checkpoint_path="tagger_proto.safetensors",
|
| 57 |
+
vocab_path="tagger_vocab_with_categories.json",
|
| 58 |
device="cuda",
|
| 59 |
)
|
| 60 |
|
|
|
|
| 71 |
# top-30 tags, pretty output
|
| 72 |
python inference_tagger_standalone.py \
|
| 73 |
--checkpoint tagger_proto.safetensors \
|
| 74 |
+
--vocab tagger_vocab_with_categories.json \
|
| 75 |
--images photo.jpg https://example.com/image.jpg \
|
| 76 |
--topk 30
|
| 77 |
|
|
|
|
| 89 |
|
| 90 |
python tagger_ui_server.py \
|
| 91 |
--checkpoint tagger_proto.safetensors \
|
| 92 |
+
--vocab tagger_vocab_with_categories.json \
|
| 93 |
--port 7860
|
| 94 |
# → open http://localhost:7860
|
| 95 |
```
|
|
|
|
| 99 |
| File | Description |
|
| 100 |
|---|---|
|
| 101 |
| `*.safetensors` | Model weights (bfloat16) |
|
| 102 |
+
| `tagger_vocab_with_categories.json` | `{"idx2tag": [...]}` — 74 625 tag strings ordered by training frequency |
|
| 103 |
| `inference_tagger_standalone.py` | Self-contained inference script (no `transformers` dep) |
|
| 104 |
| `tagger_ui_server.py` | FastAPI + Jinja2 web UI server |
|
| 105 |
|