Datasets:
Languages:
English
Size:
10K<n<100K
Fix dataset preview
Browse filesTo fix the preview, the dataset must work in streaming mode. It's not working right now because `new_url + "/file"` is not the correct way to point to a file in an online ZIP file.
We use chained URLs in streaming mode, they look like this: `zip://path/to/file::https://foo.bar/data.zip`
We extended functions like `os.path.join` to support chained URLs, therefore you can just use `os.path.join` instead. It joins the inner path inside the ZIP archive instead of appending to the URL.
- unsplash-25k-photos.py +1 -1
unsplash-25k-photos.py
CHANGED
@@ -74,7 +74,7 @@ class Unsplash(datasets.GeneratorBasedBuilder):
|
|
74 |
return [
|
75 |
datasets.SplitGenerator(
|
76 |
name=datasets.Split.TRAIN,
|
77 |
-
gen_kwargs={"filepath": new_url
|
78 |
),
|
79 |
]
|
80 |
|
|
|
74 |
return [
|
75 |
datasets.SplitGenerator(
|
76 |
name=datasets.Split.TRAIN,
|
77 |
+
gen_kwargs={"filepath": os.path.join(new_url, "photos.tsv000")}
|
78 |
),
|
79 |
]
|
80 |
|