xuemduan commited on
Commit
884b83a
·
verified ·
1 Parent(s): 0fb6b48

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -15
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
- # Load the entire dataset
141
- dataset = load_dataset('xuemduan/reevaluate-image-text-pairs')
142
-
143
- # Access specific splits
144
- train_set = load_dataset('xuemduan/reevaluate-image-text-pairs', split='train')
145
- val_set = load_dataset('xuemduan/reevaluate-image-text-pairs', split='validation')
146
- test_set = load_dataset('xuemduan/reevaluate-image-text-pairs', split='test')
147
-
148
- # Iterate through samples
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