Update DigiMag.py
Browse files- DigiMag.py +2 -2
DigiMag.py
CHANGED
|
@@ -46,7 +46,7 @@ class DigiMag(datasets.GeneratorBasedBuilder):
|
|
| 46 |
citation=_CITATION,
|
| 47 |
)
|
| 48 |
|
| 49 |
-
def custom_dataset(src_url, dest_path):
|
| 50 |
response = requests.get(src_url)
|
| 51 |
response.raise_for_status()
|
| 52 |
|
|
@@ -59,7 +59,7 @@ class DigiMag(datasets.GeneratorBasedBuilder):
|
|
| 59 |
# dl_manager is a datasets.download.DownloadManager that can be used to
|
| 60 |
# download and extract URLs
|
| 61 |
|
| 62 |
-
downloaded_file = dl_manager.download_custom(_DRIVE_URL, custom_dataset)
|
| 63 |
extracted_file = dl_manager.extract(downloaded_file)
|
| 64 |
return [
|
| 65 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": os.path.join(extracted_file, 'digimag/train.csv')}),
|
|
|
|
| 46 |
citation=_CITATION,
|
| 47 |
)
|
| 48 |
|
| 49 |
+
def custom_dataset(self, src_url, dest_path):
|
| 50 |
response = requests.get(src_url)
|
| 51 |
response.raise_for_status()
|
| 52 |
|
|
|
|
| 59 |
# dl_manager is a datasets.download.DownloadManager that can be used to
|
| 60 |
# download and extract URLs
|
| 61 |
|
| 62 |
+
downloaded_file = dl_manager.download_custom(_DRIVE_URL, self.custom_dataset)
|
| 63 |
extracted_file = dl_manager.extract(downloaded_file)
|
| 64 |
return [
|
| 65 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": os.path.join(extracted_file, 'digimag/train.csv')}),
|