cutterd commited on
Commit
2497835
·
1 Parent(s): b2c106a

Create handtest.py

Browse files
Files changed (1) hide show
  1. handtest.py +38 -0
handtest.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+
3
+ _TAR_FILES=[
4
+ " tmp.tar.gz"
5
+ ]
6
+
7
+ class ZipDataset(datasets.GeneratorBasedBuilder):
8
+
9
+ def _info(self):
10
+ return datasets.DatasetInfo(
11
+ description="TMP description",
12
+ homepage="google it",
13
+ citation="lmao",
14
+ license="dunno, tbh, assume the worst, k thx."
15
+ )
16
+
17
+ def _split_generators(self, dl_manager):
18
+ archive_path = dl_manager.download(_TAR_FILES[0])
19
+ return [
20
+ datasets.SplitGenerator(
21
+ name=datasets.Split.TRAIN,
22
+ gen_kwargs={
23
+ "images": dl_manager.iter_archive(archive_path),
24
+ },
25
+ ),
26
+ ]
27
+
28
+ def _generate_examples(self, images):
29
+ """Generate images and labels for splits."""
30
+ for file_path, file_obj in images:
31
+ yield file_path, {
32
+ "image": {"path": file_path, "bytes": file_obj.read()},
33
+ }
34
+
35
+
36
+
37
+ #https://huggingface.co/datasets/oscar-corpus/OSCAR-2201/blob/main/OSCAR-2201.py
38
+ #https://huggingface.co/datasets/food101