



import requests
def 	snake_case__       (					__lowercase							,     __lowercase       )		->		None:







						"""simple docstring"""

						A__	:							Dict						    = {"Content-Type": "application/json"}
						A__	:							Optional[int]						    = requests.post(__lowercase							,     json={"text": message_body}							,     headers=__lowercase       )
						if response.status_code != 2_0_0:
												A__	:							List[Any]						    = (
												    "Request to slack returned an error "
												    F'{response.status_code}, the response is:\n{response.text}'
												)
												raise ValueError(__lowercase       )


if __name__ == "__main__":
		# Set the slack url to the one provided by Slack when you create the webhook at
		# https://my.slack.com/services/new/incoming-webhook/
		send_slack_message('<YOUR MESSAGE BODY>', '<SLACK CHANNEL URL>')




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 .pt_to_tf import PTtoTFCommand
from .run import RunCommand
from .serving import ServeCommand
from .user import UserCommands
def 	snake_case__       (					)		->		List[Any]:







						"""simple docstring"""

						A__	:							List[Any]						    = ArgumentParser("Transformers CLI tool"							,     usage="transformers-cli <command> [<args>]"       )
						A__	:							int						    = parser.add_subparsers(help="transformers-cli command helpers"       )

						# Register commands
						ConvertCommand.register_subcommand(__lowercase       )
						DownloadCommand.register_subcommand(__lowercase       )
						EnvironmentCommand.register_subcommand(__lowercase       )
						RunCommand.register_subcommand(__lowercase       )
						ServeCommand.register_subcommand(__lowercase       )
						UserCommands.register_subcommand(__lowercase       )
						AddNewModelCommand.register_subcommand(__lowercase       )
						AddNewModelLikeCommand.register_subcommand(__lowercase       )
						LfsCommands.register_subcommand(__lowercase       )
						PTtoTFCommand.register_subcommand(__lowercase       )

						# Let's go
						A__	:							int						    = parser.parse_args()

						if not hasattr(__lowercase							,     "func"       ):
												parser.print_help()
												exit(1       )

						# Run
						A__	:							Any						    = args.func(__lowercase       )
						service.run()


if __name__ == "__main__":
		main()