Update test.py
Browse files
test.py
CHANGED
|
@@ -18,10 +18,10 @@ _LICENSE = ""
|
|
| 18 |
|
| 19 |
# _URL = "./"
|
| 20 |
|
| 21 |
-
_URLS = {
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
|
| 26 |
class imgdataset(datasets.GeneratorBasedBuilder):
|
| 27 |
""""""
|
|
@@ -61,14 +61,14 @@ class imgdataset(datasets.GeneratorBasedBuilder):
|
|
| 61 |
def _split_generators(self, dl_manager):
|
| 62 |
"""This function returns the examples in the raw (text) form."""
|
| 63 |
print("2")
|
| 64 |
-
urls = _URLS[self.config.name]
|
| 65 |
-
data_dir = dl_manager.download_and_extract(urls)
|
| 66 |
return [
|
| 67 |
datasets.SplitGenerator(
|
| 68 |
name=datasets.Split.TRAIN,
|
| 69 |
# These kwargs will be passed to _generate_examples
|
| 70 |
gen_kwargs={
|
| 71 |
-
"filepath": os.path.join(
|
| 72 |
"split": "train",
|
| 73 |
},
|
| 74 |
),
|
|
@@ -77,7 +77,7 @@ class imgdataset(datasets.GeneratorBasedBuilder):
|
|
| 77 |
name=datasets.Split.VALIDATION,
|
| 78 |
# These kwargs will be passed to _generate_examples
|
| 79 |
gen_kwargs={
|
| 80 |
-
"filepath": os.path.join(
|
| 81 |
"split": "reg",
|
| 82 |
},
|
| 83 |
),
|
|
|
|
| 18 |
|
| 19 |
# _URL = "./"
|
| 20 |
|
| 21 |
+
# _URLS = {
|
| 22 |
+
# "train": "https://huggingface.co/datasets/minnnnn/test/blob/main/train_dataset.csv",
|
| 23 |
+
# "reg": "https://huggingface.co/datasets/minnnnn/test/blob/main/reg_dataset.csv",
|
| 24 |
+
# }
|
| 25 |
|
| 26 |
class imgdataset(datasets.GeneratorBasedBuilder):
|
| 27 |
""""""
|
|
|
|
| 61 |
def _split_generators(self, dl_manager):
|
| 62 |
"""This function returns the examples in the raw (text) form."""
|
| 63 |
print("2")
|
| 64 |
+
# urls = _URLS[self.config.name]
|
| 65 |
+
# data_dir = dl_manager.download_and_extract(urls)
|
| 66 |
return [
|
| 67 |
datasets.SplitGenerator(
|
| 68 |
name=datasets.Split.TRAIN,
|
| 69 |
# These kwargs will be passed to _generate_examples
|
| 70 |
gen_kwargs={
|
| 71 |
+
"filepath": os.path.join("/content/", "train_dataset.csv"),
|
| 72 |
"split": "train",
|
| 73 |
},
|
| 74 |
),
|
|
|
|
| 77 |
name=datasets.Split.VALIDATION,
|
| 78 |
# These kwargs will be passed to _generate_examples
|
| 79 |
gen_kwargs={
|
| 80 |
+
"filepath": os.path.join("/content/", "reg_dataset.csv"),
|
| 81 |
"split": "reg",
|
| 82 |
},
|
| 83 |
),
|