



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





from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike


class   snake_case_ (lowercase__  ):




       """simple docstring"""






       def __init__(     self     ,lowercase = None     ,lowercase = None     ,lowercase = None     ,lowercase = None     ,lowercase = False     ,lowercase = False     ,lowercase = None     ,**lowercase     ,):

             """simple docstring"""





             UpperCAmelCase_  :	Optional[Any]				      =		path_or_paths
             UpperCAmelCase_  :	Optional[int]				      =		split if split or isinstance(lowercase     ,lowercase) else "train"
             UpperCAmelCase_  :	Optional[int]				      =		features
             UpperCAmelCase_  :	Dict				      =		cache_dir
             UpperCAmelCase_  :	int				      =		keep_in_memory
             UpperCAmelCase_  :	Tuple				      =		streaming
             UpperCAmelCase_  :	Union[str, Any]				      =		num_proc
             UpperCAmelCase_  :	Union[str, Any]				      =		kwargs



       @abstractmethod
       def  A_   (     self):

             """simple docstring"""





             pass


class   snake_case_ (lowercase__  ):




       """simple docstring"""






       def __init__(     self     ,lowercase = None     ,lowercase = None     ,lowercase = False     ,lowercase = False     ,lowercase = None     ,**lowercase     ,):

             """simple docstring"""





             UpperCAmelCase_  :	List[Any]				      =		features
             UpperCAmelCase_  :	List[Any]				      =		cache_dir
             UpperCAmelCase_  :	List[str]				      =		keep_in_memory
             UpperCAmelCase_  :	Optional[int]				      =		streaming
             UpperCAmelCase_  :	Dict				      =		num_proc
             UpperCAmelCase_  :	str				      =		kwargs



       @abstractmethod
       def  A_   (     self):

             """simple docstring"""





             pass
