Commit
•
ec73097
1
Parent(s):
ac57237
Update flickr_1k_test_image_text_retrieval.py
Browse files
flickr_1k_test_image_text_retrieval.py
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
# limitations under the License.
|
15 |
|
16 |
import os
|
17 |
-
|
18 |
import datasets
|
19 |
import json
|
20 |
|
@@ -43,14 +43,16 @@ class Dataset(datasets.GeneratorBasedBuilder):
|
|
43 |
"Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
|
44 |
)
|
45 |
|
46 |
-
|
47 |
-
|
|
|
|
|
48 |
})
|
49 |
|
50 |
-
return [datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs=
|
51 |
|
52 |
|
53 |
-
def _generate_examples(self,
|
54 |
"""Yields examples."""
|
55 |
df = pd.read_csv(examples)
|
56 |
print("HERE!?")
|
|
|
14 |
# limitations under the License.
|
15 |
|
16 |
import os
|
17 |
+
import pandas as pd
|
18 |
import datasets
|
19 |
import json
|
20 |
|
|
|
43 |
"Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
|
44 |
)
|
45 |
|
46 |
+
repo_id = 'yonatanbitton/mscoco_2014_5k_test_image_text_retrieval'
|
47 |
+
data_dir = dl_manager.download_and_extract({
|
48 |
+
"examples_csv": hf_hub_url(repo_id=repo_id, repo_type='dataset', filename="test_1k_flickr.csv"),
|
49 |
+
"images_dir": hf_hub_url(repo_id=repo_id, repo_type='dataset', filename="images_flickr_1k_test.zip")
|
50 |
})
|
51 |
|
52 |
+
return [datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs=data_dir)]
|
53 |
|
54 |
|
55 |
+
def _generate_examples(self, examples_csv):
|
56 |
"""Yields examples."""
|
57 |
df = pd.read_csv(examples)
|
58 |
print("HERE!?")
|