Update README.md
Browse files
README.md
CHANGED
@@ -25,9 +25,7 @@ features:
|
|
25 |
- name: answer
|
26 |
dtype: string
|
27 |
- name: image
|
28 |
-
|
29 |
-
_type: Image
|
30 |
-
decode: true
|
31 |
---
|
32 |
|
33 |
# ScienceOlympiad: Challenging AI with Olympiad-Level Multimodal Science Problems
|
@@ -69,14 +67,31 @@ The dataset is composed of a curated collection of problems from three sources:
|
|
69 |
You can load the dataset using the Hugging Face `datasets` library:
|
70 |
|
71 |
```python
|
72 |
-
from datasets import load_dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
-
|
|
|
75 |
|
76 |
-
# Access the test split
|
77 |
-
test_ds = ds['test']
|
78 |
|
79 |
-
|
|
|
|
|
80 |
```
|
81 |
|
82 |
## Citation
|
|
|
25 |
- name: answer
|
26 |
dtype: string
|
27 |
- name: image
|
28 |
+
dtype: image
|
|
|
|
|
29 |
---
|
30 |
|
31 |
# ScienceOlympiad: Challenging AI with Olympiad-Level Multimodal Science Problems
|
|
|
67 |
You can load the dataset using the Hugging Face `datasets` library:
|
68 |
|
69 |
```python
|
70 |
+
from datasets import load_dataset, Image
|
71 |
+
import matplotlib.pyplot as plt
|
72 |
+
import datasets
|
73 |
+
|
74 |
+
# Force a redownload to get the latest metadata
|
75 |
+
features = datasets.Features({
|
76 |
+
'problem_id': datasets.Value('string'),
|
77 |
+
'discipline': datasets.ClassLabel(names=['Physics', 'Chemistry']),
|
78 |
+
'problem': {
|
79 |
+
'en': datasets.Value('string'),
|
80 |
+
'zh': datasets.Value('string'),
|
81 |
+
},
|
82 |
+
'answer': datasets.Value('string'),
|
83 |
+
'image': datasets.Image(decode=True),
|
84 |
+
})
|
85 |
+
ds = load_dataset("ByteDance-Seed/ScienceOlympiad", features=features)
|
86 |
+
test_ds = ds['test']
|
87 |
|
88 |
+
example = test_ds[60]
|
89 |
+
image_data = example['image']
|
90 |
|
|
|
|
|
91 |
|
92 |
+
if image_data:
|
93 |
+
plt.imshow(image_data)
|
94 |
+
plt.show()
|
95 |
```
|
96 |
|
97 |
## Citation
|