Update CLEVR-Sudoku.py
Browse files- CLEVR-Sudoku.py +12 -2
CLEVR-Sudoku.py
CHANGED
@@ -93,8 +93,18 @@ class CLEVRSudoku(datasets.GeneratorBasedBuilder):
|
|
93 |
# )
|
94 |
|
95 |
# Download and extract the dataset archive
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
print("archive path in split generators")
|
100 |
print(type(archive_path))
|
|
|
93 |
# )
|
94 |
|
95 |
# Download and extract the dataset archive
|
96 |
+
archive_path = dl_manager.download(self.config.data_url)
|
97 |
+
|
98 |
+
# unzip file
|
99 |
+
import zipfile
|
100 |
+
with zipfile.ZipFile(archive_path,"r") as zip_ref:
|
101 |
+
unzipped_path = archive_path.split('.')[0]
|
102 |
+
print(unzipped_path)
|
103 |
+
zip_ref.extractall(unzipped_path)
|
104 |
+
|
105 |
+
files = os.listdir(unzipped_path)
|
106 |
+
print(files)
|
107 |
+
# archive_path = self.config.data_url
|
108 |
|
109 |
print("archive path in split generators")
|
110 |
print(type(archive_path))
|