





'''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=lowerCAmelCase__  )
class 							__lowercase    ( lowerCAmelCase__  ):







	'''simple docstring'''

	a      :			str     =    field(default="automatic-speech-recognition"	, metadata={"include_in_asdict_even_if_is_default": True}  )
	a      :			ClassVar[Features]     =    Features({"audio": Audio()}  )
	a      :			ClassVar[Features]     =    Features({"transcription": Value("string"  )}  )
	a      :			str     =    "audio"
	a      :			str     =    "transcription"


	def   _UpperCAmelCase       (self       ,_lowerCamelCase	)							->							List[str]:







				'''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]       ,_lowerCamelCase	):
							raise ValueError(f"Column {self.audio_column} is not an Audio type."	)
				__lowercase			  =							copy.deepcopy(self	)
				__lowercase			  =							self.input_schema.copy()
				__lowercase			  =							features[self.audio_column]
				__lowercase			  =							input_schema
				return task_template


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







				'''simple docstring'''





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












'''simple docstring'''



from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_SCREAMING_SNAKE_CASE   =      {'''configuration_focalnet''': ['''FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''FocalNetConfig''']}


try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_SCREAMING_SNAKE_CASE   =      [
	    '''FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST''',
	    '''FocalNetForImageClassification''',
	    '''FocalNetForMaskedImageModeling''',
	    '''FocalNetBackbone''',
	    '''FocalNetModel''',
	    '''FocalNetPreTrainedModel''',
	]

if TYPE_CHECKING:
	from .configuration_focalnet import FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP, FocalNetConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_focalnet import (
		    FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST,
		    FocalNetBackbone,
		    FocalNetForImageClassification,
		    FocalNetForMaskedImageModeling,
		    FocalNetModel,
		    FocalNetPreTrainedModel,
		)

else:
	import sys

	_SCREAMING_SNAKE_CASE   =      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





