


'''simple docstring'''

from typing import Dict

from .base import GenericTensor, Pipeline
class   __lowerCAmelCase						(lowercase_     ):





      '''simple docstring'''






      def       UpperCamelCase__		(self    :    Union[str, Any]   ,						UpperCamelCase    :    int=None   ,						UpperCamelCase    :    List[Any]=None   ,						UpperCamelCase    :    Union[str, Any]=None   ,						**UpperCamelCase    :    List[Any] ):

             '''simple docstring'''







             if tokenize_kwargs is None:
                    lowercase__      			= {}

             if truncation is not None:
                    if "truncation" in tokenize_kwargs:
                           raise ValueError(
                               '''truncation parameter defined twice (given as keyword argument as well as in tokenize_kwargs)''' )
                    lowercase__      			= truncation

             lowercase__      			= tokenize_kwargs

             lowercase__      			= {}
             if return_tensors is not None:
                    lowercase__      			= return_tensors

             return preprocess_params, {}, postprocess_params



      def       UpperCamelCase__		(self    :    List[str]   ,						UpperCamelCase    :    str   ,						**UpperCamelCase    :    Union[str, Any] ):

             '''simple docstring'''







             lowercase__      			= self.framework
             lowercase__      			= self.tokenizer(UpperCamelCase   ,						return_tensors=UpperCamelCase   ,						**UpperCamelCase )
             return model_inputs



      def       UpperCamelCase__		(self    :    Dict   ,						UpperCamelCase    :    List[str] ):

             '''simple docstring'''







             lowercase__      			= self.model(**UpperCamelCase )
             return model_outputs



      def       UpperCamelCase__		(self    :    Optional[int]   ,						UpperCamelCase    :    Optional[int]   ,						UpperCamelCase    :    Any=False ):

             '''simple docstring'''







             if return_tensors:
                    return model_outputs[0]
             if self.framework == "pt":
                    return model_outputs[0].tolist()
             elif self.framework == "tf":
                    return model_outputs[0].numpy().tolist()






      def __call__(self    :    str   ,						*UpperCamelCase    :    Any   ,						**UpperCamelCase    :    Optional[Any] ):

             '''simple docstring'''







             return super().__call__(*UpperCamelCase   ,						**UpperCamelCase )








'''simple docstring'''

from __future__ import annotations

def _SCREAMING_SNAKE_CASE      (A       )       ->       bool:






       """simple docstring"""







       return len(set(A       )       ) == len(A       )


if __name__ == "__main__":
 import doctest

 doctest.testmod()




