size_categories:n<1K format:parquet modality:image modality:text library:datasets library:dask library:mlcroissant library:polars region:us
---
dataset_info:
  features:
  - name: image
    dtype: image
  - name: question
    dtype: string
  - name: answer
    dtype: string
  splits:
  - name: train
    num_bytes: 678377348.0
    num_examples: 765
  download_size: 678335845
  dataset_size: 678377348.0
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---

Dataset from here: https://x.ai/blog/grok-1.5v

Script used to push the dataset:

```python
import json
from datasets import load_dataset

# load annotations
with open('realworldqa/annotations.json') as f:
    data = json.load(f)
    
# create metadata for the dataset
metadata = [{"file_name": i["image"], "question": i["question"], "answer": i["answer"]} for i in data]
    
# write metadata to json lines file
with open('realworldqa/images/metadata.jsonl', 'w') as outfile:
    for entry in metadata:
        json.dump(entry, outfile)
        outfile.write('\n')
        
# load image dataset
dataset = load_dataset("imagefolder", data_dir="realworldqa/images")

# push to hub!
dataset.push_to_hub("xai-org/realworldqa")
```

Based on the guide here: https://huggingface.co/docs/datasets/en/image_dataset#object-detection