





import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin

class        __SCREAMING_SNAKE_CASE					(     unittest.TestCase   ,		_a       ):






       def 				_lowerCamelCase		(						self  ):
              UpperCamelCase__				     =			load_tool("""text-classification"""  )
              self.tool.setup()
              UpperCamelCase__				     =			load_tool("""text-classification"""  , remote=__lowerCAmelCase  )






       def 				_lowerCamelCase		(						self  ):
              UpperCamelCase__				     =			self.tool("""That's quite cool"""  , ["""positive""", """negative"""]  )
              self.assertEqual(__lowerCAmelCase  , """positive"""  )






       def 				_lowerCamelCase		(						self  ):
              UpperCamelCase__				     =			self.remote_tool("""That's quite cool"""  , ["""positive""", """negative"""]  )
              self.assertEqual(__lowerCAmelCase  , """positive"""  )






       def 				_lowerCamelCase		(						self  ):
              UpperCamelCase__				     =			self.tool(text="""That's quite cool"""  , labels=["""positive""", """negative"""]  )
              self.assertEqual(__lowerCAmelCase  , """positive"""  )







       def 				_lowerCamelCase		(						self  ):
              UpperCamelCase__				     =			self.remote_tool(text="""That's quite cool"""  , labels=["""positive""", """negative"""]  )
              self.assertEqual(__lowerCAmelCase  , """positive"""  )











from argparse import ArgumentParser

from .env import EnvironmentCommand





def     _UpperCamelCase     ():






							"""simple docstring"""





							UpperCamelCase__				     =			ArgumentParser("""Diffusers CLI tool"""   ,			usage="""diffusers-cli <command> [<args>]"""       )
							UpperCamelCase__				     =			parser.add_subparsers(help="""diffusers-cli command helpers"""       )

							# Register commands
							EnvironmentCommand.register_subcommand(a__       )

							# Let's go
							UpperCamelCase__				     =			parser.parse_args()

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

							# Run
							UpperCamelCase__				     =			args.func(a__       )
							service.run()


if __name__ == "__main__":
					main()




