


import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin
class 				SCREAMING_SNAKE_CASE__						(       unittest.TestCase		,					lowercase__    ):
      def  SCREAMING_SNAKE_CASE							( self       : int  )	->    str:
             a_      :	Optional[int]							=						load_tool('text-classification'  )
             self.tool.setup()
             a_      :	Tuple							=						load_tool('text-classification'  ,							remote=SCREAMING_SNAKE_CASE__  )
      def  SCREAMING_SNAKE_CASE							( self       : Any  )	->    List[str]:
             a_      :	Optional[Any]							=						self.tool('That\'s quite cool'  ,							['positive', 'negative']  )
             self.assertEqual(SCREAMING_SNAKE_CASE__  ,							'positive'  )
      def  SCREAMING_SNAKE_CASE							( self       : int  )	->    List[str]:
             a_      :	List[Any]							=						self.remote_tool('That\'s quite cool'  ,							['positive', 'negative']  )
             self.assertEqual(SCREAMING_SNAKE_CASE__  ,							'positive'  )
      def  SCREAMING_SNAKE_CASE							( self       : Tuple  )	->    int:
             a_      :	int							=						self.tool(text='That\'s quite cool'  ,							labels=['positive', 'negative']  )
             self.assertEqual(SCREAMING_SNAKE_CASE__  ,							'positive'  )

      def  SCREAMING_SNAKE_CASE							( self       : Union[str, Any]  )	->    int:
             a_      :	str							=						self.remote_tool(text='That\'s quite cool'  ,							labels=['positive', 'negative']  )
             self.assertEqual(SCREAMING_SNAKE_CASE__  ,							'positive'  )






from argparse import ArgumentParser

from .env import EnvironmentCommand







def  SCREAMING_SNAKE_CASE_		(    )			->	str:

       """simple docstring"""

       a_      :	str							=						ArgumentParser('Diffusers CLI tool'						,					usage='diffusers-cli <command> [<args>]'       )
       a_      :	Any							=						parser.add_subparsers(help='diffusers-cli command helpers'       )

       # Register commands
       EnvironmentCommand.register_subcommand(__A       )

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

       if not hasattr(__A						,					'func'       ):
              parser.print_help()
              exit(1       )

       # Run
       a_      :	Union[str, Any]							=						args.func(__A       )
       service.run()


if __name__ == "__main__":
   main()


