Spaces:
Running
Running
dev(narugo): add aibooru
Browse files
app.py
CHANGED
@@ -14,6 +14,8 @@ from hfutils.operate import get_hf_fs, get_hf_client
|
|
14 |
from hfutils.utils import TemporaryDirectory
|
15 |
from imgutils.tagging import wd14
|
16 |
|
|
|
|
|
17 |
_REPO_ID = 'deepghs/index_experiments'
|
18 |
|
19 |
hf_fs = get_hf_fs()
|
@@ -33,6 +35,7 @@ _SITE_CLS = {
|
|
33 |
'konachan': KonachanWebpDataPool,
|
34 |
'anime_pictures': AnimePicturesWebpDataPool,
|
35 |
'rule34': Rule34WebpDataPool,
|
|
|
36 |
}
|
37 |
|
38 |
|
|
|
14 |
from hfutils.utils import TemporaryDirectory
|
15 |
from imgutils.tagging import wd14
|
16 |
|
17 |
+
from pools import AIBooruWebpDataPool
|
18 |
+
|
19 |
_REPO_ID = 'deepghs/index_experiments'
|
20 |
|
21 |
hf_fs = get_hf_fs()
|
|
|
35 |
'konachan': KonachanWebpDataPool,
|
36 |
'anime_pictures': AnimePicturesWebpDataPool,
|
37 |
'rule34': Rule34WebpDataPool,
|
38 |
+
'aibooru': AIBooruWebpDataPool,
|
39 |
}
|
40 |
|
41 |
|
pools.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from cheesechaser.datapool import IncrementIDDataPool
|
2 |
+
|
3 |
+
_AIBOORU_REPO_ID = 'deepghs/aibooru-webp-4Mpixel'
|
4 |
+
|
5 |
+
|
6 |
+
class AIBooruWebpDataPool(IncrementIDDataPool):
|
7 |
+
def __init__(self, revision: str = 'main'):
|
8 |
+
IncrementIDDataPool.__init__(
|
9 |
+
self,
|
10 |
+
data_repo_id=_AIBOORU_REPO_ID,
|
11 |
+
data_revision=revision,
|
12 |
+
idx_repo_id=_AIBOORU_REPO_ID,
|
13 |
+
idx_revision=revision,
|
14 |
+
base_level=3,
|
15 |
+
)
|