Update README.md
Browse files
README.md
CHANGED
@@ -97,6 +97,7 @@ Examples of our MM-IQ:
|
|
97 |
You can download this dataset by the following command (make sure that you have installed [Huggingface Datasets](https://huggingface.co/docs/datasets/quickstart)):
|
98 |
|
99 |
```python
|
|
|
100 |
from datasets import load_dataset
|
101 |
|
102 |
dataset = load_dataset("huanqia/MM-IQ")
|
@@ -110,8 +111,10 @@ print(dataset["test"][0])
|
|
110 |
print(dataset["test"][0]['data_id']) # print the problem id
|
111 |
print(dataset["test"][0]['question']) # print the question text
|
112 |
print(dataset["test"][0]['answer']) # print the answer
|
113 |
-
print(dataset["test"][0]['image']["bytes"]) # print the image raw bytes
|
114 |
print(dataset["test"][0]['image']['path']) # print the image path
|
|
|
|
|
|
|
115 |
```
|
116 |
|
117 |
We have uploaded a demo to illustrate how to access the MM-IQ dataset on Hugging Face, available at [hugging_face_dataset_demo.ipynb](https://github.com/AceCHQ/MMIQ/blob/main/mmiq/jupyter_notebook_demos/hugging_face_dataset_demo.ipynb).
|
@@ -121,7 +124,7 @@ We have uploaded a demo to illustrate how to access the MM-IQ dataset on Hugging
|
|
121 |
|
122 |
### Data Format
|
123 |
|
124 |
-
The dataset is provided in
|
125 |
|
126 |
```json
|
127 |
{
|
@@ -129,7 +132,7 @@ The dataset is provided in json format and contains the following attributes:
|
|
129 |
"answer": [string] The correct answer for the problem,
|
130 |
"data_id": [int] The problem id,
|
131 |
"category": [string] The category of reasoning pattern,
|
132 |
-
"image": [dict]
|
133 |
}
|
134 |
```
|
135 |
|
|
|
97 |
You can download this dataset by the following command (make sure that you have installed [Huggingface Datasets](https://huggingface.co/docs/datasets/quickstart)):
|
98 |
|
99 |
```python
|
100 |
+
from IPython.display import display, Image
|
101 |
from datasets import load_dataset
|
102 |
|
103 |
dataset = load_dataset("huanqia/MM-IQ")
|
|
|
111 |
print(dataset["test"][0]['data_id']) # print the problem id
|
112 |
print(dataset["test"][0]['question']) # print the question text
|
113 |
print(dataset["test"][0]['answer']) # print the answer
|
|
|
114 |
print(dataset["test"][0]['image']['path']) # print the image path
|
115 |
+
# Display the image
|
116 |
+
print("Image context:")
|
117 |
+
display(Image(dataset["test"][0]['image']["bytes"]))
|
118 |
```
|
119 |
|
120 |
We have uploaded a demo to illustrate how to access the MM-IQ dataset on Hugging Face, available at [hugging_face_dataset_demo.ipynb](https://github.com/AceCHQ/MMIQ/blob/main/mmiq/jupyter_notebook_demos/hugging_face_dataset_demo.ipynb).
|
|
|
124 |
|
125 |
### Data Format
|
126 |
|
127 |
+
The dataset is provided in JSON format and contains the following attributes:
|
128 |
|
129 |
```json
|
130 |
{
|
|
|
132 |
"answer": [string] The correct answer for the problem,
|
133 |
"data_id": [int] The problem id,
|
134 |
"category": [string] The category of reasoning pattern,
|
135 |
+
"image": [dict] Containing image raw bytes and image path (corresponding to the image in data.zip),
|
136 |
}
|
137 |
```
|
138 |
|