feat(dependencies): add image tagging script && update torch dependency
This commit is contained in:
parent
92ab8bcbcc
commit
458a0d9410
10
a.py
Normal file
10
a.py
Normal file
@ -0,0 +1,10 @@
|
||||
from PIL import Image
|
||||
|
||||
from wdtagger import Tagger
|
||||
|
||||
if __name__ == "__main__":
|
||||
tagger = Tagger()
|
||||
images = [
|
||||
Image.open("./tests/images/赤松楓.9d64b955.jpeg"),
|
||||
]
|
||||
results = tagger.tag(images)
|
@ -17,8 +17,8 @@ dev = ["pytest>=8.3.3", "pytest-benchmark>=5.1.0", "ruff>=0.8.0"]
|
||||
|
||||
|
||||
[project.optional-dependencies]
|
||||
cpu = ["torch>=2.5.1", "torchvision>=0.20.1", "timm>=1.0.11"]
|
||||
gpu = ["torch>=2.5.1", "torchvision>=0.20.1", "timm>=1.0.11"]
|
||||
cpu = ["torch>=2.0.0", "torchvision>=0.20.1", "timm>=1.0.11"]
|
||||
gpu = ["torch>=2.0.0", "torchvision>=0.20.1", "timm>=1.0.11"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 140
|
||||
|
Loading…
x
Reference in New Issue
Block a user