


from typing import TYPE_CHECKING

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


snake_case_  :     Dict							  =							{
    '''configuration_flava''': [
        '''FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''FlavaConfig''',
        '''FlavaImageCodebookConfig''',
        '''FlavaImageConfig''',
        '''FlavaMultimodalConfig''',
        '''FlavaTextConfig''',
    ],
}

try:
							if not is_vision_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							snake_case_  :     int							  =							['''FlavaFeatureExtractor''']
							snake_case_  :     Dict							  =							['''FlavaImageProcessor''']
							snake_case_  :     Any							  =							['''FlavaProcessor''']

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							snake_case_  :     Union[str, Any]							  =							[
							    '''FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''FlavaForPreTraining''',
							    '''FlavaImageCodebook''',
							    '''FlavaImageModel''',
							    '''FlavaModel''',
							    '''FlavaMultimodalModel''',
							    '''FlavaPreTrainedModel''',
							    '''FlavaTextModel''',
							]

if TYPE_CHECKING:
							from .configuration_flava import (
							    FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    FlavaConfig,
							    FlavaImageCodebookConfig,
							    FlavaImageConfig,
							    FlavaMultimodalConfig,
							    FlavaTextConfig,
							)

							try:
														if not is_vision_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .feature_extraction_flava import FlavaFeatureExtractor
														from .image_processing_flava import FlavaImageProcessor
														from .processing_flava import FlavaProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_flava import (
														    FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST,
														    FlavaForPreTraining,
														    FlavaImageCodebook,
														    FlavaImageModel,
														    FlavaModel,
														    FlavaMultimodalModel,
														    FlavaPreTrainedModel,
														    FlavaTextModel,
														)

else:
							import sys

							snake_case_  :     Union[str, Any]							  =							_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



from ..utils import DummyObject, requires_backends

class   A__							(						metaclass=UpperCamelCase__					):
						UpperCAmelCase     =  ["torch", "librosa"]




						def __init__(    self   : Dict			,      *_a   : Union[str, Any]			,      **_a   : List[str]					)							->       Optional[int]:


										"""simple docstring"""





										requires_backends(self			,      ['''torch''', '''librosa''']					)




						@classmethod
						def 							__UpperCamelCase			(    cls   : Dict			,      *_a   : Tuple			,      **_a   : Tuple					)							->       Optional[int]:


										"""simple docstring"""





										requires_backends(cls			,      ['''torch''', '''librosa''']					)




						@classmethod
						def 							__UpperCamelCase			(    cls   : List[Any]			,      *_a   : Any			,      **_a   : List[str]					)							->       Dict:


										"""simple docstring"""





										requires_backends(cls			,      ['''torch''', '''librosa''']					)

class   A__							(						metaclass=UpperCamelCase__					):
						UpperCAmelCase     =  ["torch", "librosa"]




						def __init__(    self   : List[Any]			,      *_a   : int			,      **_a   : int					)							->       Optional[Any]:


										"""simple docstring"""





										requires_backends(self			,      ['''torch''', '''librosa''']					)




						@classmethod
						def 							__UpperCamelCase			(    cls   : str			,      *_a   : Dict			,      **_a   : Optional[Any]					)							->       Union[str, Any]:


										"""simple docstring"""





										requires_backends(cls			,      ['''torch''', '''librosa''']					)




						@classmethod
						def 							__UpperCamelCase			(    cls   : List[str]			,      *_a   : Optional[int]			,      **_a   : Union[str, Any]					)							->       Optional[Any]:


										"""simple docstring"""





										requires_backends(cls			,      ['''torch''', '''librosa''']					)