File size: 708 Bytes
24baf68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python
"""Build the training shards from images + captions. See docs/data_format.md.

    python scripts/prepare_data.py --images ./my_images --out ./data
    python scripts/prepare_data.py --captions-file pairs.jsonl --out ./data
    python scripts/prepare_data.py --hf-dataset <user>/<dataset> --image-column image --caption-column caption --out ./data
"""

import os
import sys

try:
    from dwd_klein.prepare import main
except ImportError:  # running from a source checkout without installing the package
    sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "src"))
    from dwd_klein.prepare import main

if __name__ == "__main__":
    sys.exit(main())