Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -136,22 +136,19 @@ The dataset can be loaded and used with the Hugging Face `datasets` library:
|
|
| 136 |
|
| 137 |
```python
|
| 138 |
from datasets import load_dataset
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
for sample in train_set:
|
| 150 |
-
image_path = sample['image']
|
| 151 |
-
uuid = sample['uuid']
|
| 152 |
-
object_type = sample['object_type']
|
| 153 |
-
query_texts = sample['query_text']
|
| 154 |
-
description_text = sample['target_txt']
|
| 155 |
```
|
| 156 |
|
| 157 |
## Citation
|
|
|
|
| 136 |
|
| 137 |
```python
|
| 138 |
from datasets import load_dataset
|
| 139 |
+
from IPython.display import display
|
| 140 |
+
from PIL import Image
|
| 141 |
+
import io
|
| 142 |
|
| 143 |
+
ds = load_dataset("xuemduan/reevaluate-image-text-pairs")
|
| 144 |
+
|
| 145 |
+
sample = ds["train"][0]
|
| 146 |
+
|
| 147 |
+
print(sample["uuid"])
|
| 148 |
+
print(sample["object_type"])
|
| 149 |
+
print(sample["query_text"])
|
| 150 |
+
print(sample["target_text"])
|
| 151 |
+
display(sample["image"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
```
|
| 153 |
|
| 154 |
## Citation
|