





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


a__			:    str			      =		{
    'configuration_imagegpt': ['IMAGEGPT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ImageGPTConfig', 'ImageGPTOnnxConfig']
}

try:
      if not is_vision_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      a__			:    Optional[int]			      =		['ImageGPTFeatureExtractor']
      a__			:    List[str]			      =		['ImageGPTImageProcessor']

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      a__			:    List[Any]			      =		[
          'IMAGEGPT_PRETRAINED_MODEL_ARCHIVE_LIST',
          'ImageGPTForCausalImageModeling',
          'ImageGPTForImageClassification',
          'ImageGPTModel',
          'ImageGPTPreTrainedModel',
          'load_tf_weights_in_imagegpt',
      ]


if TYPE_CHECKING:
      from .configuration_imagegpt import IMAGEGPT_PRETRAINED_CONFIG_ARCHIVE_MAP, ImageGPTConfig, ImageGPTOnnxConfig

      try:
            if not is_vision_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .feature_extraction_imagegpt import ImageGPTFeatureExtractor
            from .image_processing_imagegpt import ImageGPTImageProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_imagegpt import (
                IMAGEGPT_PRETRAINED_MODEL_ARCHIVE_LIST,
                ImageGPTForCausalImageModeling,
                ImageGPTForImageClassification,
                ImageGPTModel,
                ImageGPTPreTrainedModel,
                load_tf_weights_in_imagegpt,
            )

else:
      import sys

      a__			:    Union[str, Any]			      =		_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)










from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier

# Load iris file
a__			:    List[str]			      =		load_iris()
iris.keys()


print(f'''Target names: \n {iris.target_names} ''')
print(f'''\n Features: \n {iris.feature_names}''')

# Train set e Test set
a__      ,							a__      ,							a__      ,							a__			:    Any			      =		train_test_split(
    iris['data'], iris['target'], random_state=4
)

# KNN

a__			:    List[Any]			      =		KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
a__			:    Optional[Any]			      =		[[1, 2, 1, 4], [2, 3, 4, 5]]

a__			:    Union[str, Any]			      =		knn.predict(X_new)

print(
    f'''\nNew array: \n {X_new}\n\nTarget Names Prediction: \n'''
    f''' {iris['target_names'][prediction]}'''
)



