


import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


__lowerCamelCase   	=  '''
Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf originally as a company that developed a chatbot app targeted at teenagers.[2] After open-sourcing the model behind the chatbot, the company pivoted to focus on being a platform for machine learning.

In March 2021, Hugging Face raised $40 million in a Series B funding round.[3]

On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model.[4] In 2022, the workshop concluded with the announcement of BLOOM, a multilingual large language model with 176 billion parameters.[5]
'''


class 	a__						(    unittest.TestCase    ,							lowerCAmelCase_     ):

       def     UpperCAmelCase( self   :  Optional[int]     ):
            a_     :  List[Any]				      =     load_tool("""summarization"""     )
            self.tool.setup()
            a_     :  Any				      =     load_tool("""summarization"""   ,				remote=lowerCamelCase_     )

       def     UpperCAmelCase( self   :  Any     ):
            a_     :  int				      =     self.tool(lowerCamelCase_     )
            self.assertEqual(
                lowerCamelCase_   ,				"""Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM."""   ,				)

       def     UpperCAmelCase( self   :  Union[str, Any]     ):
            a_     :  str				      =     self.remote_tool(lowerCamelCase_     )
            self.assertEqual(
                lowerCamelCase_   ,				"""Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM."""   ,				)

       def     UpperCAmelCase( self   :  Tuple     ):
            a_     :  Any				      =     self.tool(text=lowerCamelCase_     )
            self.assertEqual(
                lowerCamelCase_   ,				"""Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM."""   ,				)

       def     UpperCAmelCase( self   :  Optional[Any]     ):
            a_     :  Optional[Any]				      =     self.remote_tool(text=lowerCamelCase_     )
            self.assertEqual(
                lowerCamelCase_   ,				"""Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM."""   ,				)





from dataclasses import dataclass
from typing import List, Optional, Union

import numpy as np
import PIL

from ...utils import BaseOutput, is_invisible_watermark_available, is_torch_available, is_transformers_available


@dataclass
class 							lowercase   (						_SCREAMING_SNAKE_CASE  ):
		__lowercase			:			Union[List[PIL.Image.Image], np.ndarray]


if is_transformers_available() and is_torch_available() and is_invisible_watermark_available():
					from .pipeline_stable_diffusion_xl import StableDiffusionXLPipeline
					from .pipeline_stable_diffusion_xl_imgaimg import StableDiffusionXLImgaImgPipeline
