


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

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

@dataclass(frozen=snake_case__     )
class   A__ (   snake_case__     ):







    """simple docstring"""

    __magic_name__        =		field(default='automatic-speech-recognition'	, metadata={'include_in_asdict_even_if_is_default': True}     )
    __magic_name__        =		Features({'audio': Audio()}     )
    __magic_name__        =		Features({'transcription': Value('string'     )}     )
    __magic_name__        =		"audio"
    __magic_name__        =		"transcription"
    def 		a_      (	self      , __snake_case   ):
         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.'''   )
         snake_case					=    copy.deepcopy(self   )
         snake_case					=    self.input_schema.copy()
         snake_case					=    features[self.audio_column]
         snake_case					=    input_schema
         return task_template




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








from ...configuration_utils import PretrainedConfig
from ...utils import logging


_SCREAMING_SNAKE_CASE      :			Dict      				=   logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE      :			Optional[Any]      				=   {
    "alibaba-damo/mgp-str-base": "https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json",
}

class   A__ (   snake_case__     ):







    """simple docstring"""

    __magic_name__        =		'mgp-str'
    def __init__(	self      , __snake_case=[3_2, 1_2_8]      , __snake_case=4      , __snake_case=3      , __snake_case=2_7      , __snake_case=3_8      , __snake_case=5_0_2_5_7      , __snake_case=3_0_5_2_2      , __snake_case=7_6_8      , __snake_case=1_2      , __snake_case=1_2      , __snake_case=4.0      , __snake_case=True      , __snake_case=False      , __snake_case=1E-5      , __snake_case=0.0      , __snake_case=0.0      , __snake_case=0.0      , __snake_case=False      , __snake_case=0.02      , **__snake_case      , ):
         super().__init__(**__snake_case   )

         snake_case					=    image_size
         snake_case					=    patch_size
         snake_case					=    num_channels
         snake_case					=    max_token_length
         snake_case					=    num_character_labels
         snake_case					=    num_bpe_labels
         snake_case					=    num_wordpiece_labels
         snake_case					=    hidden_size
         snake_case					=    num_hidden_layers
         snake_case					=    num_attention_heads
         snake_case					=    mlp_ratio
         snake_case					=    distilled
         snake_case					=    layer_norm_eps
         snake_case					=    drop_rate
         snake_case					=    qkv_bias
         snake_case					=    attn_drop_rate
         snake_case					=    drop_path_rate
         snake_case					=    output_aa_attentions
         snake_case					=    initializer_range




