Skip to content
Snippets Groups Projects

Implement format command

Merged Yoann Schneider requested to merge implement-format-command into main
19 files
+ 242
518
Compare changes
  • Side-by-side
  • Inline
Files
19
# -*- coding: utf-8 -*-
"""
Format datasets for training.
"""
from pathlib import Path
from dan.datasets.format.atr import run
def add_format_parser(subcommands) -> None:
parser = subcommands.add_parser(
"format",
description=__doc__,
help=__doc__,
)
parser.add_argument(
"--dataset",
type=Path,
help="Path to the exported dataset.",
required=True,
)
parser.add_argument(
"--image-format",
type=str,
help="Format under which the images were saved.",
required=True,
)
parser.add_argument(
"--keep-spaces",
action="store_true",
help="Do not remove spaces in transcriptions.",
)
parser.set_defaults(func=run)
Loading