Datasets:
Commit ·
2213bb4
1
Parent(s): d1b927b
Delete app.py
Browse files
app.py
DELETED
|
@@ -1,38 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import datasets
|
| 3 |
-
from huggingface_hub import HfApi
|
| 4 |
-
from datasets import DownloadManager, DatasetInfo
|
| 5 |
-
from datasets.data_files import DataFilesDict
|
| 6 |
-
|
| 7 |
-
_EXTENSION = [".png"]
|
| 8 |
-
_NAME = "metaltiger775/test"
|
| 9 |
-
_REVISION = "main"
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
class DanbooruDataset(datasets.GeneratorBasedBuilder):
|
| 13 |
-
BUILDER_CONFIGS = [
|
| 14 |
-
# add number before name for sorting
|
| 15 |
-
datasets.BuilderConfig(
|
| 16 |
-
name="test",
|
| 17 |
-
description="test subset",
|
| 18 |
-
),
|
| 19 |
-
]
|
| 20 |
-
|
| 21 |
-
def _info(self) -> DatasetInfo:
|
| 22 |
-
if self.config.name == "2-tags":
|
| 23 |
-
features = {
|
| 24 |
-
"tags": datasets.Value("string"),
|
| 25 |
-
"post_id": datasets.Value("int64")
|
| 26 |
-
}
|
| 27 |
-
else:
|
| 28 |
-
features = {
|
| 29 |
-
"image": datasets.Image(),
|
| 30 |
-
"tags": datasets.Value("string")
|
| 31 |
-
}
|
| 32 |
-
return datasets.DatasetInfo(
|
| 33 |
-
description=self.config.description,
|
| 34 |
-
|
| 35 |
-
features=datasets.Features(features),
|
| 36 |
-
supervised_keys=None,
|
| 37 |
-
citation="",
|
| 38 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|