


'''simple docstring'''






from typing import TYPE_CHECKING

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


__A :  int    							=				{
    "configuration_swiftformer": [
        "SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "SwiftFormerConfig",
        "SwiftFormerOnnxConfig",
    ]
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __A :  Tuple    							=				[
      "SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
      "SwiftFormerForImageClassification",
      "SwiftFormerModel",
      "SwiftFormerPreTrainedModel",
  ]

if TYPE_CHECKING:
  from .configuration_swiftformer import (
      SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
      SwiftFormerConfig,
      SwiftFormerOnnxConfig,
  )

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_swiftformer import (
        SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
        SwiftFormerForImageClassification,
        SwiftFormerModel,
        SwiftFormerPreTrainedModel,
    )

else:
  import sys

  __A :  Optional[Any]    							=				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)







'''simple docstring'''






import requests







def     UpperCamelCase_      (   A__ :       str							,   A__ :       str ):
  '''simple docstring'''





  lowerCAmelCase_      :				Optional[Any]      =       {"""Content-Type""": """application/json"""}
  lowerCAmelCase_      :				Union[str, Any]      =       requests.post(A__							,   json={"""text""": message_body}							,   headers=A__ )
  if response.status_code != 2_00:
    lowerCAmelCase_      :				Dict      =       (
        """Request to slack returned an error """
        f'{response.status_code}, the response is:\n{response.text}'
    )
    raise ValueError(A__ )


if __name__ == "__main__":
  # Set the slack url to the one provided by Slack when you create the webhook at
  # https://my.slack.com/services/new/incoming-webhook/
  send_slack_message("<YOUR MESSAGE BODY>", "<SLACK CHANNEL URL>")



