import torch

from diffusers import StableDiffusionPipeline


lowerCamelCase_    :		Union[str, Any]							=	"""path-to-your-trained-model"""
lowerCamelCase_    :		int							=	StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.floataa).to("""cuda""")

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

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





import numpy as np
from sklearn.datasets import fetch_california_housing
from sklearn.metrics import mean_absolute_error, mean_squared_error
from sklearn.model_selection import train_test_split
from xgboost import XGBRegressor
def 							lowerCAmelCase(     __lowerCamelCase						):
					return (data["data"], data["target"])
def 							lowerCAmelCase(     __lowerCamelCase				,    __lowerCamelCase				,    __lowerCamelCase						):
					__a		 =       XGBRegressor(verbosity=0				,    random_state=42						)
					xgb.fit(__lowerCamelCase				,    __lowerCamelCase						)
					# Predict target for test data
					__a		 =       xgb.predict(__lowerCamelCase						)
					__a		 =       predictions.reshape(len(__lowerCamelCase						)				,    1						)
					return predictions
def 							lowerCAmelCase(     ):
					__a		 =       fetch_california_housing()
					__a ,				__a		 =       data_handling(__lowerCamelCase						)
					__a ,				__a ,				__a ,				__a		 =       train_test_split(
					    __lowerCamelCase				,    __lowerCamelCase				,    test_size=0.25				,    random_state=1						)
					__a		 =       xgboost(__lowerCamelCase				,    __lowerCamelCase				,    __lowerCamelCase						)
					# Error printing
					print(f'''Mean Absolute Error : {mean_absolute_error(__lowerCamelCase				,    __lowerCamelCase						)}'''						)
					print(f'''Mean Square Error  : {mean_squared_error(__lowerCamelCase				,    __lowerCamelCase						)}'''						)


if __name__ == "__main__":
	import doctest

	doctest.testmod(verbose=True)
	main()




