/usr/local/lib/python3.6/site-packages/transformers/commands
NameSizeModeActions
__pycache__/-0755rm
add_new_model.py106640644editdlrm
add_new_model_like.py638010644editdlrm
convert.py78710644editdlrm
download.py18600644editdlrm
env.py33100644editdlrm
lfs.py79480644editdlrm
run.py42490644editdlrm
serving.py80270644editdlrm
train.py63470644editdlrm
transformers_cli.py19560644editdlrm
user.py84150644editdlrm
__init__.py9230644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/transformers/commands/transformers_cli.py (1956B)
#!/usr/bin/env python # Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from argparse import ArgumentParser from .add_new_model import AddNewModelCommand from .add_new_model_like import AddNewModelLikeCommand from .convert import ConvertCommand from .download import DownloadCommand from .env import EnvironmentCommand from .lfs import LfsCommands from .run import RunCommand from .serving import ServeCommand from .user import UserCommands def main(): parser = ArgumentParser("Transformers CLI tool", usage="transformers-cli []") commands_parser = parser.add_subparsers(help="transformers-cli command helpers") # Register commands ConvertCommand.register_subcommand(commands_parser) DownloadCommand.register_subcommand(commands_parser) EnvironmentCommand.register_subcommand(commands_parser) RunCommand.register_subcommand(commands_parser) ServeCommand.register_subcommand(commands_parser) UserCommands.register_subcommand(commands_parser) AddNewModelCommand.register_subcommand(commands_parser) AddNewModelLikeCommand.register_subcommand(commands_parser) LfsCommands.register_subcommand(commands_parser) # Let's go args = parser.parse_args() if not hasattr(args, "func"): parser.print_help() exit(1) # Run service = args.func(args) service.run() if __name__ == "__main__": main()