Add envs.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
__pycache__/
|
||||
.vscode/
|
||||
.venv/
|
||||
.env
|
||||
|
||||
presets/
|
||||
@@ -0,0 +1,9 @@
|
||||
pandas==2.1.1
|
||||
huggingface-hub==0.17.3
|
||||
torch==2.0.1
|
||||
Pillow==10.0.1
|
||||
# tensorflow==2.14.0
|
||||
# tensorflow-io==0.34.0
|
||||
deepdanbooru==1.0.2
|
||||
onnxruntime==1.16.0
|
||||
opencv-python==4.8.0.76
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
|
||||
from tagger.interrogator import WaifuDiffusionInterrogator
|
||||
from PIL import Image
|
||||
|
||||
interrogator = WaifuDiffusionInterrogator(
|
||||
'wd14-convnextv2-v2',
|
||||
repo_id='SmilingWolf/wd-v1-4-convnextv2-tagger-v2',
|
||||
revision='v2.0'
|
||||
)
|
||||
|
||||
im = Image.open("image.jpg")
|
||||
result = interrogator.interrogate(im)
|
||||
print()
|
||||
|
||||
for k, v in result[1].items():
|
||||
if v > 0.25:
|
||||
print(k, v)
|
||||
|
||||
print(result[0])
|
||||
|
||||
Reference in New Issue
Block a user