minnnnn commited on
Commit
6f9de0e
·
1 Parent(s): 7011ffc

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +8 -8
test.py CHANGED
@@ -18,10 +18,10 @@ _LICENSE = ""
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,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(data_dir, "train_dataset.csv"),
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(data_dir, "reg_dataset.csv"),
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
  ),