File size: 378 Bytes
a244e91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import csv
import json
import os

import datasets
import pandas as pd
import numpy as np

ds = datasets.load_dataset('./wit_dataset_script.py', data_dir='./wit_data_dir/')
test_ds = ds['test']


def transform(example):

    example['pixel_values'] = np.load(example['pixels_file'])
    return example


test_ds = test_ds.map(transform)

for x in test_ds:
    print(x)
    break