






'''simple docstring'''




import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Audio, Features, Value
from .base import TaskTemplate







@dataclass(frozen=A_				)
class  A_						(A_				):
							"""simple docstring"""




							a__ 		=						field(default='''automatic-speech-recognition'''    ,       metadata={'''include_in_asdict_even_if_is_default''': True}				)
							a__ 		=						Features({'''audio''': Audio()}				)
							a__ 		=						Features({'''transcription''': Value('''string'''				)}				)
							a__ 		=						"audio"
							a__ 		=						"transcription"

							def 				_A						(		self      :List[Any]							,				lowerCAmelCase__      :int					)					->	Any:


										'''simple docstring'''




										if self.audio_column not in features:
													raise ValueError(F'''Column {self.audio_column} is not present in features.'''					)
										if not isinstance(features[self.audio_column]							,				snake_case__					):
													raise ValueError(F'''Column {self.audio_column} is not an Audio type.'''					)
										snake_case_					:       Union[str, Any] =							copy.deepcopy(self					)
										snake_case_					:       List[str] =							self.input_schema.copy()
										snake_case_					:       Any =							features[self.audio_column]
										snake_case_					:       List[str] =							input_schema
										return task_template






							@property
							def 				_A						(		self      :List[str]					)					->	Dict[str, str]:


										'''simple docstring'''




										return {self.audio_column: "audio", self.transcription_column: "transcription"}






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


__lowerCamelCase				=			{
    """configuration_chinese_clip""": [
        """CHINESE_CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """ChineseCLIPConfig""",
        """ChineseCLIPOnnxConfig""",
        """ChineseCLIPTextConfig""",
        """ChineseCLIPVisionConfig""",
    ],
    """processing_chinese_clip""": ["""ChineseCLIPProcessor"""],
}

try:
   if not is_vision_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __lowerCamelCase				=			["""ChineseCLIPFeatureExtractor"""]
   __lowerCamelCase				=			["""ChineseCLIPImageProcessor"""]

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __lowerCamelCase				=			[
       """CHINESE_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """ChineseCLIPModel""",
       """ChineseCLIPPreTrainedModel""",
       """ChineseCLIPTextModel""",
       """ChineseCLIPVisionModel""",
   ]

if TYPE_CHECKING:
   from .configuration_chinese_clip import (
       CHINESE_CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
       ChineseCLIPConfig,
       ChineseCLIPOnnxConfig,
       ChineseCLIPTextConfig,
       ChineseCLIPVisionConfig,
   )
   from .processing_chinese_clip import ChineseCLIPProcessor

   try:
      if not is_vision_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .feature_extraction_chinese_clip import ChineseCLIPFeatureExtractor, ChineseCLIPImageProcessor

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_chinese_clip import (
          CHINESE_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
          ChineseCLIPModel,
          ChineseCLIPPreTrainedModel,
          ChineseCLIPTextModel,
          ChineseCLIPVisionModel,
      )

else:
   import sys

   __lowerCamelCase				=			_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





