

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A__										=      {"configuration_nat": ["NAT_PRETRAINED_CONFIG_ARCHIVE_MAP", "NatConfig"]}


try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  A__										=      [
      "NAT_PRETRAINED_MODEL_ARCHIVE_LIST",
      "NatForImageClassification",
      "NatModel",
      "NatPreTrainedModel",
      "NatBackbone",
  ]

if TYPE_CHECKING:
  from .configuration_nat import NAT_PRETRAINED_CONFIG_ARCHIVE_MAP, NatConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_nat import (
        NAT_PRETRAINED_MODEL_ARCHIVE_LIST,
        NatBackbone,
        NatForImageClassification,
        NatModel,
        NatPreTrainedModel,
    )

else:
  import sys

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





from typing import Optional

from ..utils.logging import get_logger
from .audio_classificiation import AudioClassification
from .automatic_speech_recognition import AutomaticSpeechRecognition
from .base import TaskTemplate
from .image_classification import ImageClassification
from .language_modeling import LanguageModeling
from .question_answering import QuestionAnsweringExtractive
from .summarization import Summarization
from .text_classification import TextClassification


A__										=      [
    "AutomaticSpeechRecognition",
    "AudioClassification",
    "ImageClassification",
    "LanguageModeling",
    "QuestionAnsweringExtractive",
    "Summarization",
    "TaskTemplate",
    "TextClassification",
]

A__										=      get_logger(__name__)


A__										=      {
    AutomaticSpeechRecognition.task: AutomaticSpeechRecognition,
    AudioClassification.task: AudioClassification,
    ImageClassification.task: ImageClassification,
    LanguageModeling.task: LanguageModeling,
    QuestionAnsweringExtractive.task: QuestionAnsweringExtractive,
    Summarization.task: Summarization,
    TextClassification.task: TextClassification,
}





def 				__a							(       __A						):
    SCREAMING_SNAKE_CASE__         =    task_template_dict.get("task"						)
    if task_name is None:
        logger.warning(f"Couldn't find template for task '{task_name}'. Available templates: {list(__A						)}"						)
        return None
    SCREAMING_SNAKE_CASE__         =    NAMEaTEMPLATE.get(__A						)
    return template.from_dict(__A						)


