



'''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 				a__(   lowerCamelCase__      ):
    lowercase__					=       field(default="""automatic-speech-recognition"""						,					metadata={"""include_in_asdict_even_if_is_default""": True}      )
    lowercase__					=       Features({"""audio""": Audio()}      )
    lowercase__					=       Features({"""transcription""": Value("""string"""      )}      )
    lowercase__					=       "audio"
    lowercase__					=       "transcription"







    def      lowercase_			( self					:    Any		,     __snake_case					:    Union[str, Any]      ):
      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."""      )
      a		:   List[str]	  =	copy.deepcopy(self      )
      a		:   Optional[Any]	  =	self.input_schema.copy()
      a		:   int	  =	features[self.audio_column]
      a		:   List[str]	  =	input_schema
      return task_template







    @property
    def      lowercase_			( self					:    Dict      ):
      return {self.audio_column: "audio", self.transcription_column: "transcription"}




'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


lowerCAmelCase:   List[str]					=		{
    'configuration_falcon': ['FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP', 'FalconConfig'],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCAmelCase:   str					=		[
         'FALCON_PRETRAINED_MODEL_ARCHIVE_LIST',
         'FalconForCausalLM',
         'FalconModel',
         'FalconPreTrainedModel',
         'FalconForSequenceClassification',
         'FalconForTokenClassification',
         'FalconForQuestionAnswering',
     ]


if TYPE_CHECKING:
     from .configuration_falcon import FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP, FalconConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_falcon import (
              FALCON_PRETRAINED_MODEL_ARCHIVE_LIST,
              FalconForCausalLM,
              FalconForQuestionAnswering,
              FalconForSequenceClassification,
              FalconForTokenClassification,
              FalconModel,
              FalconPreTrainedModel,
          )


else:
     import sys

     lowerCAmelCase:   Optional[int]					=		_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)