Serhii commited on
Commit
78959b7
·
1 Parent(s): 24c9e21
Files changed (1) hide show
  1. Custom_SQuAD.py +2 -1
Custom_SQuAD.py CHANGED
@@ -106,6 +106,7 @@ class ShellcodeIA32(datasets.GeneratorBasedBuilder):
106
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
107
  my_urls = _URLs[self.config.name]
108
  data_dir = dl_manager.download_and_extract("https://huggingface.co/datasets/Serhii/Custom_SQuAD/blob/main/Dataset.json")
 
109
  # return [
110
  # datasets.SplitGenerator(
111
  # name=datasets.Split.TRAIN,
@@ -166,7 +167,7 @@ class ShellcodeIA32(datasets.GeneratorBasedBuilder):
166
  # The `key` is here for legacy reason (tfds) and is not important in itself.
167
  """This function returns the examples in the raw (text) form."""
168
  print(f"FILEPATH ------------------ {filepath}")
169
- df = pd.read_csv(filepath, delimiter = '\t')
170
  train = df.sample(frac = 0.8, random_state = 0)
171
  test = df.drop(train.index)
172
  dev = test.sample(frac = 0.5, random_state = 0)
 
106
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
107
  my_urls = _URLs[self.config.name]
108
  data_dir = dl_manager.download_and_extract("https://huggingface.co/datasets/Serhii/Custom_SQuAD/blob/main/Dataset.json")
109
+ data_dir = "/home/pc/Dev/HF_Datasets/Custom_SQuAD/Dataset.json"
110
  # return [
111
  # datasets.SplitGenerator(
112
  # name=datasets.Split.TRAIN,
 
167
  # The `key` is here for legacy reason (tfds) and is not important in itself.
168
  """This function returns the examples in the raw (text) form."""
169
  print(f"FILEPATH ------------------ {filepath}")
170
+ df = pd.read_json(filepath, delimiter = '\t')
171
  train = df.sample(frac = 0.8, random_state = 0)
172
  test = df.drop(train.index)
173
  dev = test.sample(frac = 0.5, random_state = 0)