system HF staff commited on
Commit
2945a56
1 Parent(s): 954824e

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

Files changed (1) hide show
  1. piaf.py +3 -5
piaf.py CHANGED
@@ -20,7 +20,6 @@ from __future__ import absolute_import, division, print_function
20
 
21
  import json
22
  import logging
23
- import os
24
 
25
  import datasets
26
 
@@ -45,6 +44,8 @@ Piaf is a reading comprehension \
45
  dataset. This version, published in February 2020, contains 3835 questions on French Wikipedia.
46
  """
47
 
 
 
48
 
49
  class PiafConfig(datasets.BuilderConfig):
50
  """BuilderConfig for PIAF."""
@@ -61,9 +62,6 @@ class PiafConfig(datasets.BuilderConfig):
61
  class Piaf(datasets.GeneratorBasedBuilder):
62
  """The Piaf Question Answering Dataset. Version 1.0."""
63
 
64
- _URL = "https://github.com/etalab-ia/piaf-code/raw/master/"
65
- _TRAINING_FILE = "piaf-v1.0.json"
66
-
67
  BUILDER_CONFIGS = [
68
  PiafConfig(
69
  name="plain_text",
@@ -97,7 +95,7 @@ class Piaf(datasets.GeneratorBasedBuilder):
97
  )
98
 
99
  def _split_generators(self, dl_manager):
100
- urls_to_download = {"train": os.path.join(self._URL, self._TRAINING_FILE)}
101
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
102
 
103
  return [
 
20
 
21
  import json
22
  import logging
 
23
 
24
  import datasets
25
 
 
44
  dataset. This version, published in February 2020, contains 3835 questions on French Wikipedia.
45
  """
46
 
47
+ _URLS = {"train": "https://github.com/etalab-ia/piaf-code/raw/master/piaf-v1.0.json"}
48
+
49
 
50
  class PiafConfig(datasets.BuilderConfig):
51
  """BuilderConfig for PIAF."""
 
62
  class Piaf(datasets.GeneratorBasedBuilder):
63
  """The Piaf Question Answering Dataset. Version 1.0."""
64
 
 
 
 
65
  BUILDER_CONFIGS = [
66
  PiafConfig(
67
  name="plain_text",
 
95
  )
96
 
97
  def _split_generators(self, dl_manager):
98
+ urls_to_download = _URLS
99
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
100
 
101
  return [