jonathan-roberts1 commited on
Commit
674e901
·
verified ·
1 Parent(s): 4823faa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -2
README.md CHANGED
@@ -40,15 +40,38 @@ configs:
40
  ### Dataset Summary
41
  TODO
42
 
43
- ### Code
 
 
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
 
46
 
47
  ### Dataset Curators
48
 
49
  This dataset was curated by Jonathan Roberts, Kai Han, and Samuel Albanie
50
 
51
-
52
  ### Citation Information
53
  ```
54
  @article{roberts2024grab,
 
40
  ### Dataset Summary
41
  TODO
42
 
43
+ ### Example usage
44
+ ```python
45
+ from datasets import load_dataset
46
 
47
+ # load dataset
48
+ grab_dataset = load_dataset("jonathan-roberts1/GRAB", split='GRAB')
49
+ """
50
+ Dataset({
51
+ features: ['pid', 'question', 'decoded_image', 'image', 'answer', 'task', 'category', 'complexity'],
52
+ num_rows: 2170
53
+ })
54
+ """
55
+ # query individual questions
56
+ grab_dataset[40] # e.g., the 41st element
57
+ """
58
+ {'pid': 40, 'question': 'What is the value of the y-intercept of the function? Give your answer as an integer.',
59
+ 'decoded_image': <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=5836x4842 at 0x12288EA60>,
60
+ 'image': 'images/40.png', 'answer': '1', 'task': 'properties', 'category': 'Intercepts and Gradients',
61
+ 'complexity': 0}
62
+ """
63
+ question_40 = grab_dataset[40]['question'] # question
64
+ answer_40 = grab_dataset[40]['answer'] # ground truth answer
65
+ pil_image_40 = grab_dataset[0]['decoded_image']
66
+ ```
67
+ Note -- the 'image' feature corresponds to filepaths in the ```images``` dir in this repository: (https://huggingface.co/datasets/jonathan-roberts1/GRAB/resolve/main/images.zip)
68
 
69
+ Please visit our [GitHub repository](https://github.com/jonathan-roberts1/GRAB) for example inference code.
70
 
71
  ### Dataset Curators
72
 
73
  This dataset was curated by Jonathan Roberts, Kai Han, and Samuel Albanie
74
 
 
75
  ### Citation Information
76
  ```
77
  @article{roberts2024grab,