


from typing import TYPE_CHECKING

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


snake_case							:       Tuple     			=      {
    '''configuration_resnet''': ['''RESNET_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ResNetConfig''', '''ResNetOnnxConfig''']
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							:       List[str]     			=      [
						    '''RESNET_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''ResNetForImageClassification''',
						    '''ResNetModel''',
						    '''ResNetPreTrainedModel''',
						    '''ResNetBackbone''',
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							:       Optional[Any]     			=      [
						    '''TF_RESNET_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''TFResNetForImageClassification''',
						    '''TFResNetModel''',
						    '''TFResNetPreTrainedModel''',
						]

try:
						if not is_flax_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							:       Tuple     			=      [
						    '''FlaxResNetForImageClassification''',
						    '''FlaxResNetModel''',
						    '''FlaxResNetPreTrainedModel''',
						]

if TYPE_CHECKING:
						from .configuration_resnet import RESNET_PRETRAINED_CONFIG_ARCHIVE_MAP, ResNetConfig, ResNetOnnxConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_resnet import (
												    RESNET_PRETRAINED_MODEL_ARCHIVE_LIST,
												    ResNetBackbone,
												    ResNetForImageClassification,
												    ResNetModel,
												    ResNetPreTrainedModel,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_resnet import (
												    TF_RESNET_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFResNetForImageClassification,
												    TFResNetModel,
												    TFResNetPreTrainedModel,
												)

						try:
												if not is_flax_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_flax_resnet import FlaxResNetForImageClassification, FlaxResNetModel, FlaxResNetPreTrainedModel


else:
						import sys

						snake_case							:       Optional[Any]     			=      _LazyModule(__name__, globals()['''__file__'''], _import_structure)








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

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







@dataclass(frozen=lowerCamelCase_      )
class        snake_case_   (lowerCamelCase_      ):
					UpperCAmelCase__					:    str          =			field(default='''audio-classification'''	,						metadata={'''include_in_asdict_even_if_is_default''': True}      )
					UpperCAmelCase__					:    ClassVar[Features]          =			Features({'''audio''': Audio()}      )
					UpperCAmelCase__					:    ClassVar[Features]          =			Features({'''labels''': ClassLabel}      )
					UpperCAmelCase__					:    str          =			"audio"
					UpperCAmelCase__					:    str          =			"labels"
					def  lowerCamelCase__(      self   :Optional[int]			,__snake_case   :int      )					->    str:
												if self.label_column not in features:
																			raise ValueError(F'Column {self.label_column} is not present in features.'      )
												if not isinstance(features[self.label_column]			,__snake_case      ):
																			raise ValueError(F'Column {self.label_column} is not a ClassLabel.'      )
												a__             =     copy.deepcopy(self      )
												a__             =     self.label_schema.copy()
												a__             =     features[self.label_column]
												a__             =     label_schema
												return task_template



					@property
					def  lowerCamelCase__(      self   :Dict      )					->    Dict[str, str]:
												return {
												    self.audio_column: "audio",
												    self.label_column: "labels",
												}




