


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

import diffusers.utils.hub_utils







class 				lowerCamelCase__       (	unittest.TestCase):





     @patch('''diffusers.utils.hub_utils.get_full_repo_name'''	)
     def 					__A (self		,					UpperCAmelCase	)					->       None:
      _lowercase											='''full_repo_name'''
      with TemporaryDirectory() as tmpdir:
       # Dummy args values
       _lowercase											=Mock()
       _lowercase											=tmpdir
       _lowercase											=0
       _lowercase											='''hub_token'''
       _lowercase											='''dataset_name'''
       _lowercase											=0.01
       _lowercase											=1_0_0_0_0_0
       _lowercase											=1_0_0_0_0
       _lowercase											=0.01
       _lowercase											=0.02
       _lowercase											=0.03
       _lowercase											=0.0005
       _lowercase											=0.00_0001
       _lowercase											=1
       _lowercase											=1_0
       _lowercase											=0.001
       _lowercase											=0.1
       _lowercase											=0.2
       _lowercase											=True

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








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCAmelCase__            =							{'''configuration_visual_bert''': ['''VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''VisualBertConfig''']}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase__            =							[
      '''VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''VisualBertForMultipleChoice''',
      '''VisualBertForPreTraining''',
      '''VisualBertForQuestionAnswering''',
      '''VisualBertForRegionToPhraseAlignment''',
      '''VisualBertForVisualReasoning''',
      '''VisualBertLayer''',
      '''VisualBertModel''',
      '''VisualBertPreTrainedModel''',
  ]


if TYPE_CHECKING:
  from .configuration_visual_bert import VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, VisualBertConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_visual_bert import (
        VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
        VisualBertForMultipleChoice,
        VisualBertForPreTraining,
        VisualBertForQuestionAnswering,
        VisualBertForRegionToPhraseAlignment,
        VisualBertForVisualReasoning,
        VisualBertLayer,
        VisualBertModel,
        VisualBertPreTrainedModel,
    )


else:
  import sys

  UpperCAmelCase__            =							_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

