[WIP] - CLI

This commit is contained in:
thomwolf
2019-10-16 14:17:58 +02:00
committed by Morgan Funtowicz
parent e57d00ee10
commit 72c36b9ea2
10 changed files with 631 additions and 127 deletions

View File

@@ -1,14 +1,15 @@
#!/usr/bin/env python
from argparse import ArgumentParser
from transformers.commands.serving import ServeCommand
from transformers.commands.user import UserCommands
if __name__ == '__main__':
parser = ArgumentParser(description='Transformers CLI tool', usage='transformers-cli <command> [<args>]')
parser = ArgumentParser('Transformers CLI tool', usage='transformers-cli <command> [<args>]')
commands_parser = parser.add_subparsers(help='transformers-cli command helpers')
# Register commands
ServeCommand.register_subcommand(commands_parser)
UserCommands.register_subcommand(commands_parser)
# Let's go