


"""simple docstring"""





import torch

from diffusers import StableDiffusionPipeline


snake_case__		:     Optional[Any]    				=				'''path-to-your-trained-model'''
snake_case__		:     Any    				=				StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.floataa).to('''cuda''')

snake_case__		:     Optional[Any]    				=				'''A photo of sks dog in a bucket'''
snake_case__		:     Optional[int]    				=				pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]

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






"""simple docstring"""





def      _snake_case						(						_snake_case				:			float ,   _snake_case				:			list[float]			):
      if discount_rate < 0:
            raise ValueError('''Discount rate cannot be negative'''			)
      if not cash_flows:
            raise ValueError('''Cash flows list cannot be empty'''			)
      lowerCAmelCase					:	List[str]       =   sum(
          cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(_snake_case			)			)
      return round(_snake_case ,   ndigits=2			)


if __name__ == "__main__":
 import doctest

 doctest.testmod()


