






'''simple docstring'''

from typing import TYPE_CHECKING

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


UpperCAmelCase__						:str          =			{
    "configuration_xlm": ["XLM_PRETRAINED_CONFIG_ARCHIVE_MAP", "XLMConfig", "XLMOnnxConfig"],
    "tokenization_xlm": ["XLMTokenizer"],
}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			UpperCAmelCase__						:Tuple          =			[
			    "XLM_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "XLMForMultipleChoice",
			    "XLMForQuestionAnswering",
			    "XLMForQuestionAnsweringSimple",
			    "XLMForSequenceClassification",
			    "XLMForTokenClassification",
			    "XLMModel",
			    "XLMPreTrainedModel",
			    "XLMWithLMHeadModel",
			]

try:
			if not is_tf_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			UpperCAmelCase__						:Optional[int]          =			[
			    "TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "TFXLMForMultipleChoice",
			    "TFXLMForQuestionAnsweringSimple",
			    "TFXLMForSequenceClassification",
			    "TFXLMForTokenClassification",
			    "TFXLMMainLayer",
			    "TFXLMModel",
			    "TFXLMPreTrainedModel",
			    "TFXLMWithLMHeadModel",
			]


if TYPE_CHECKING:
			from .configuration_xlm import XLM_PRETRAINED_CONFIG_ARCHIVE_MAP, XLMConfig, XLMOnnxConfig
			from .tokenization_xlm import XLMTokenizer

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_xlm import (
						    XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
						    XLMForMultipleChoice,
						    XLMForQuestionAnswering,
						    XLMForQuestionAnsweringSimple,
						    XLMForSequenceClassification,
						    XLMForTokenClassification,
						    XLMModel,
						    XLMPreTrainedModel,
						    XLMWithLMHeadModel,
						)

			try:
						if not is_tf_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_xlm import (
						    TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
						    TFXLMForMultipleChoice,
						    TFXLMForQuestionAnsweringSimple,
						    TFXLMForSequenceClassification,
						    TFXLMForTokenClassification,
						    TFXLMMainLayer,
						    TFXLMModel,
						    TFXLMPreTrainedModel,
						    TFXLMWithLMHeadModel,
						)

else:
			import sys

			UpperCAmelCase__						:List[str]          =			_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)











'''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 	SCREAMING_SNAKE_CASE	(      lowerCAmelCase_  ):
       snake_case__    :     str   		=			field(default='automatic-speech-recognition'    ,   metadata={'include_in_asdict_even_if_is_default': True}  )
       snake_case__    :     ClassVar[Features]   		=			Features({'audio': Audio()}  )
       snake_case__    :     ClassVar[Features]   		=			Features({'transcription': Value('string'  )}  )
       snake_case__    :     str   		=			"audio"
       snake_case__    :     str   		=			"transcription"




       def 					a_					(					self      : Any	,    A__      : 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]	,    A__					):
                 raise ValueError(f"Column {self.audio_column} is not an Audio type."					)
            __lowerCamelCase						:       Dict				   =				copy.deepcopy(self					)
            __lowerCamelCase						:       List[Any]				   =				self.input_schema.copy()
            __lowerCamelCase						:       Optional[int]				   =				features[self.audio_column]
            __lowerCamelCase						:       Any				   =				input_schema
            return task_template




       @property
       def 					a_					(					self      : Any					):


            """simple docstring"""







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



