


import torch

from diffusers import StableDiffusionPipeline


lowerCAmelCase							=						"""path-to-your-trained-model"""
lowerCAmelCase							=						StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.floataa).to("""cuda""")

lowerCAmelCase							=						"""A photo of sks dog in a bucket"""
lowerCAmelCase							=						pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]

image.save("""dog-bucket.png""")





from string import ascii_uppercase

lowerCAmelCase							=						{char: i for i, char in enumerate(ascii_uppercase)}
lowerCAmelCase							=						dict(enumerate(ascii_uppercase))




def 						__SCREAMING_SNAKE_CASE       (					lowercase_			,					lowercase_			)		->    str:




						'''simple docstring'''







						__UpperCAmelCase :       List[Any]  						=  len(lowercase_			)
						__UpperCAmelCase :       int  						=  0
						while True:
												if x == i:
																		__UpperCAmelCase :       List[str]  						=  0
												if len(lowercase_			) == len(lowercase_			):
																		break
												key += key[i]
												i += 1
						return key




def 						__SCREAMING_SNAKE_CASE       (					lowercase_			,					lowercase_			)		->    str:




						'''simple docstring'''







						__UpperCAmelCase :       str  						=  ''''''
						__UpperCAmelCase :       List[str]  						=  0
						for letter in message:
												if letter == " ":
																		cipher_text += " "
												else:
																		__UpperCAmelCase :       Optional[int]  						=  (dicta[letter] - dicta[key_new[i]]) % 26
																		i += 1
																		cipher_text += dicta[x]
						return cipher_text




def 						__SCREAMING_SNAKE_CASE       (					lowercase_			,					lowercase_			)		->    str:




						'''simple docstring'''







						__UpperCAmelCase :       Optional[int]  						=  ''''''
						__UpperCAmelCase :       List[str]  						=  0
						for letter in cipher_text:
												if letter == " ":
																		or_txt += " "
												else:
																		__UpperCAmelCase :       int  						=  (dicta[letter] + dicta[key_new[i]] + 26) % 26
																		i += 1
																		or_txt += dicta[x]
						return or_txt




def 						__SCREAMING_SNAKE_CASE       (					)		->    None:




						'''simple docstring'''







						__UpperCAmelCase :       Optional[int]  						=  '''THE GERMAN ATTACK'''
						__UpperCAmelCase :       List[Any]  						=  '''SECRET'''
						__UpperCAmelCase :       Optional[int]  						=  generate_key(lowercase_			,					lowercase_			)
						__UpperCAmelCase :       List[str]  						=  cipher_text(lowercase_			,					lowercase_			)
						print(f"Encrypted Text = {s}"			)
						print(f"Original Text = {original_text(lowercase_			,					lowercase_			)}"			)


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				main()

