
import requests




def  __magic_name__ (   __lowerCAmelCase	:						str		,  __lowerCAmelCase	:						str							)			->   None:
				__lowerCamelCase    					=	{'''Content-Type''': '''application/json'''}
				__lowerCamelCase    					=	requests.post(__lowerCAmelCase		,  json={'''text''': message_body}		,  headers=__lowerCAmelCase							)
				if response.status_code != 200:
								__lowerCamelCase    					=	(
								    '''Request to slack returned an error '''
								    f'''{response.status_code}, the response is:\n{response.text}'''
								)
								raise ValueError(__lowerCAmelCase							)


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>")





from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
					if not (is_transformers_available() and is_torch_available() and is_transformers_version(">=", "4.25.0")):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_torch_and_transformers_objects import UnCLIPImageVariationPipeline, UnCLIPPipeline
else:
					from .pipeline_unclip import UnCLIPPipeline
					from .pipeline_unclip_image_variation import UnCLIPImageVariationPipeline
					from .text_proj import UnCLIPTextProjModel



