



'''simple docstring'''





import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
 import ctypes
 import msvcrt  # noqa






 class 	lowerCAmelCase_(    ctypes.Structure					):
   '''simple docstring'''




   __lowercase							:				Any           =				[('''size''', ctypes.c_int), ('''visible''', ctypes.c_byte)]
def        _SCREAMING_SNAKE_CASE  (	):



    """simple docstring"""





    if os.name == "nt":
        lowerCAmelCase__			:  int											= CursorInfo()
        lowerCAmelCase__			:  Union[str, Any]											= ctypes.windll.kernelaa.GetStdHandle(-11      )
        ctypes.windll.kernelaa.GetConsoleCursorInfo(UpperCamelCase							,   ctypes.byref(UpperCamelCase      )      )
        lowerCAmelCase__			:  List[str]											= False
        ctypes.windll.kernelaa.SetConsoleCursorInfo(UpperCamelCase							,   ctypes.byref(UpperCamelCase      )      )
    elif os.name == "posix":
        sys.stdout.write("""\033[?25l"""      )
        sys.stdout.flush()
def        _SCREAMING_SNAKE_CASE  (	):



    """simple docstring"""





    if os.name == "nt":
        lowerCAmelCase__			:  Any											= CursorInfo()
        lowerCAmelCase__			:  Optional[Any]											= ctypes.windll.kernelaa.GetStdHandle(-11      )
        ctypes.windll.kernelaa.GetConsoleCursorInfo(UpperCamelCase							,   ctypes.byref(UpperCamelCase      )      )
        lowerCAmelCase__			:  Optional[Any]											= True
        ctypes.windll.kernelaa.SetConsoleCursorInfo(UpperCamelCase							,   ctypes.byref(UpperCamelCase      )      )
    elif os.name == "posix":
        sys.stdout.write("""\033[?25h"""      )
        sys.stdout.flush()




@contextmanager
def        _SCREAMING_SNAKE_CASE  (	):



    """simple docstring"""





    try:
        hide_cursor()
        yield
    finally:
        show_cursor()







'''simple docstring'''





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowerCAmelCase										=     {
    '''configuration_blip_2''': [
        '''BLIP_2_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''Blip2Config''',
        '''Blip2QFormerConfig''',
        '''Blip2VisionConfig''',
    ],
    '''processing_blip_2''': ['''Blip2Processor'''],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowerCAmelCase										=     [
     '''BLIP_2_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''Blip2Model''',
     '''Blip2QFormerModel''',
     '''Blip2PreTrainedModel''',
     '''Blip2ForConditionalGeneration''',
     '''Blip2VisionModel''',
 ]

if TYPE_CHECKING:
 from .configuration_blip_a import (
     BLIP_2_PRETRAINED_CONFIG_ARCHIVE_MAP,
     BlipaConfig,
     BlipaQFormerConfig,
     BlipaVisionConfig,
 )
 from .processing_blip_a import BlipaProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_blip_a import (
      BLIP_2_PRETRAINED_MODEL_ARCHIVE_LIST,
      BlipaForConditionalGeneration,
      BlipaModel,
      BlipaPreTrainedModel,
      BlipaQFormerModel,
      BlipaVisionModel,
  )

else:
 import sys

 _lowerCAmelCase										=     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


