borgholt commited on
Commit
5193e15
·
verified ·
1 Parent(s): bede6f2

Upload folder using huggingface_hub

Browse files
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.11
README.md ADDED
File without changes
lb_data_test/__init__.py ADDED
File without changes
lb_data_test/lb_data_test.py ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Tuple
2
+ from typing import Generator
3
+
4
+ import datasets
5
+ from datasets import Value
6
+
7
+ _DESCRIPTION = """\
8
+ ...
9
+ """
10
+
11
+ _URL = "..."
12
+
13
+
14
+ class LaboASRConfig(datasets.BuilderConfig):
15
+
16
+ def __init__(
17
+ self,
18
+ do_stuff: bool = False,
19
+ **kwargs,
20
+ ):
21
+ super(LaboASRConfig, self).__init__(version=datasets.Version("0.0.1", ""), **kwargs)
22
+ self.do_stuff = do_stuff
23
+
24
+
25
+ class LaboASR(datasets.GeneratorBasedBuilder):
26
+
27
+ CORTI_DATASET_NAME = "labo"
28
+ DEFAULT_WRITER_BATCH_SIZE = 256
29
+ DEFAULT_CONFIG_NAME = "default"
30
+ BUILDER_CONFIG_CLASS = LaboASRConfig
31
+
32
+ BUILDER_CONFIGS = [
33
+ LaboASRConfig(
34
+ name="default",
35
+ description="Default config.",
36
+ ),
37
+ ]
38
+
39
+ def _info(self):
40
+ features = {
41
+ "transcript": Value("string"),
42
+ "id": Value("string"),
43
+ }
44
+ return datasets.DatasetInfo(
45
+ description=_DESCRIPTION,
46
+ features=datasets.Features(features),
47
+ homepage=_URL,
48
+ )
49
+
50
+ def _split_generators(self, dl_manager):
51
+ return [
52
+ datasets.SplitGenerator(
53
+ name=datasets.Split.TRAIN,
54
+ gen_kwargs={
55
+ "paths": ["1", "2", "3"],
56
+ },
57
+ ),
58
+ datasets.SplitGenerator(
59
+ name=datasets.Split.VALIDATION,
60
+ gen_kwargs={
61
+ "paths": ["4", "5", "6"],
62
+ },
63
+ ),
64
+ ]
65
+
66
+ def _generate_examples(
67
+ self,
68
+ paths: list[str],
69
+ ) -> Generator[Tuple[int, dict], None, None]:
70
+
71
+ for i, p in enumerate(paths):
72
+
73
+ # Yield example
74
+ example = {
75
+ "transcript": "Hello, world!",
76
+ "id": "0000" + p,
77
+ }
78
+
79
+ yield i, example
poetry.lock ADDED
The diff for this file is too large to render. See raw diff
 
pyproject.toml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [tool.poetry]
2
+ name = "lb-data-test"
3
+ version = "0.1.0"
4
+ description = ""
5
+ authors = ["Your Name <you@example.com>"]
6
+ readme = "README.md"
7
+
8
+ [tool.poetry.dependencies]
9
+ python = "^3.10"
10
+ datasets = "^3.2.0"
11
+ ipython = "^8.31.0"
12
+ numpy = "^1"
13
+
14
+
15
+ [build-system]
16
+ requires = ["poetry-core"]
17
+ build-backend = "poetry.core.masonry.api"
tests/__init__.py ADDED
File without changes