Update README.md
Browse files
README.md
CHANGED
@@ -18,7 +18,11 @@ Converted from [SmilingWolf/wd-swinv2-tagger-v3](https://huggingface.co/SmilingW
|
|
18 |
```py
|
19 |
from transformers import pipeline
|
20 |
|
21 |
-
pipe = pipeline(
|
|
|
|
|
|
|
|
|
22 |
|
23 |
print(pipe("sample.webp", top_k=20))
|
24 |
#[{'label': '1girl', 'score': 0.996832549571991},
|
@@ -43,8 +47,8 @@ import numpy as np
|
|
43 |
import torch
|
44 |
|
45 |
from transformers import (
|
46 |
-
|
47 |
-
|
48 |
)
|
49 |
|
50 |
MODEL_NAME = "p1atdev/wd-swinv2-tagger-v3-hf"
|
|
|
18 |
```py
|
19 |
from transformers import pipeline
|
20 |
|
21 |
+
pipe = pipeline(
|
22 |
+
"image-classification",
|
23 |
+
model="p1atdev/wd-swinv2-tagger-v3-hf",
|
24 |
+
trust_remote_code=True,
|
25 |
+
)
|
26 |
|
27 |
print(pipe("sample.webp", top_k=20))
|
28 |
#[{'label': '1girl', 'score': 0.996832549571991},
|
|
|
47 |
import torch
|
48 |
|
49 |
from transformers import (
|
50 |
+
AutoImageProcessor,
|
51 |
+
AutoModelForImageClassification,
|
52 |
)
|
53 |
|
54 |
MODEL_NAME = "p1atdev/wd-swinv2-tagger-v3-hf"
|