


'''simple docstring'''



import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import Mock, patch

import diffusers.utils.hub_utils





class        UpperCAmelCase_  (unittest.TestCase  ):





				"""simple docstring"""






				@patch('diffusers.utils.hub_utils.get_full_repo_name'     )
				def 				lowercase_    (							self      ,					SCREAMING_SNAKE_CASE_     )    ->					None:
									__lowerCamelCase       :     int        =		'full_repo_name'
									with TemporaryDirectory() as tmpdir:
														# Dummy args values
														__lowerCamelCase       :     List[str]        =		Mock()
														__lowerCamelCase       :     Optional[int]        =		tmpdir
														__lowerCamelCase       :     List[str]        =		0
														__lowerCamelCase       :     Tuple        =		'hub_token'
														__lowerCamelCase       :     Tuple        =		'dataset_name'
														__lowerCamelCase       :     Any        =		0.0_1
														__lowerCamelCase       :     str        =		10_00_00
														__lowerCamelCase       :     Union[str, Any]        =		1_00_00
														__lowerCamelCase       :     int        =		0.0_1
														__lowerCamelCase       :     Optional[Any]        =		0.0_2
														__lowerCamelCase       :     List[str]        =		0.0_3
														__lowerCamelCase       :     Optional[int]        =		0.0_0_0_5
														__lowerCamelCase       :     List[str]        =		0.0_0_0_0_0_1
														__lowerCamelCase       :     List[Any]        =		1
														__lowerCamelCase       :     Optional[int]        =		10
														__lowerCamelCase       :     List[Any]        =		0.0_0_1
														__lowerCamelCase       :     Dict        =		0.1
														__lowerCamelCase       :     Dict        =		0.2
														__lowerCamelCase       :     Optional[Any]        =		True

														# Model card mush be rendered and saved
														diffusers.utils.hub_utils.create_model_card(lowercase_      ,					model_name='model_name'     )
														self.assertTrue((Path(lowercase_     ) / 'README.md').is_file()     )










'''simple docstring'''



from typing import TYPE_CHECKING

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


A__		: str												=  {"""configuration_hubert""": ["""HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """HubertConfig"""]}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A__		: List[str]												=  [
          """HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """HubertForCTC""",
          """HubertForSequenceClassification""",
          """HubertModel""",
          """HubertPreTrainedModel""",
      ]


try:
      if not is_tf_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A__		: Optional[int]												=  [
          """TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """TFHubertForCTC""",
          """TFHubertModel""",
          """TFHubertPreTrainedModel""",
      ]

if TYPE_CHECKING:
      from .configuration_hubert import HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, HubertConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_hubert import (
                HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                HubertForCTC,
                HubertForSequenceClassification,
                HubertModel,
                HubertPreTrainedModel,
            )

      try:
            if not is_tf_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_tf_hubert import (
                TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                TFHubertForCTC,
                TFHubertModel,
                TFHubertPreTrainedModel,
            )


else:
      import sys

      A__		: Optional[int]												=  _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






