File size: 889 Bytes
2cd207c
6389f31
2cd207c
 
 
6389f31
6febf41
dbb7d2e
2cd207c
b21aab5
 
 
2cd207c
 
 
 
 
 
 
 
 
 
 
 
bca2bcb
 
 
 
 
 
2cd207c
3f0bdca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from datasets import load_dataset, Dataset, load_from_disk
import os


def main():
    os.makedirs('./promptbook', exist_ok=True)
    promptbook = load_dataset('NYUSHPRP/ModelCofferPromptBook', split='train')
    print(promptbook)
    promptbook.save_to_disk('./promptbook')
    #
    # roster = load_dataset('NYUSHPRP/ModelCofferRoster', split='train')
    # roster.save_to_disk('./roster')


def load():
    roster = load_from_disk('./roster')
    print(roster)


def test():
    promptbook = load_from_disk('./promptbook')
    print(promptbook[0]['image'])


# def drop_metadata_checked_column():
#     ModelCofferMetadata = load_dataset('NYUSHPRP/ModelCofferMetadata', split='train')
#     ModelCofferMetadata = ModelCofferMetadata.remove_columns(['checked'])
#     ModelCofferMetadata.push_to_hub('NYUSHPRP/ModelCofferMetadata', split='train')


if __name__ == '__main__':
    main()