




"""simple docstring"""




import copy

from transformers.configuration_utils import PretrainedConfig
from transformers.utils import logging


a_            =   logging.get_logger(__name__)

class        UpperCAmelCase_  (	snake_case						):
		UpperCamelCase									="hybrid-clip"
		UpperCamelCase									=True
		def __init__(		self							,		UpperCamelCase_=5_12							,		**UpperCamelCase_   )		->   Optional[int]:
					super().__init__(**UpperCamelCase_   )

					if "text_config" not in kwargs:
								raise ValueError('''`text_config` can not be `None`.'''   )

					if "vision_config" not in kwargs:
								raise ValueError('''`vision_config` can not be `None`.'''   )

					__lowercase	:       Optional[Any]				=   kwargs.pop('''text_config'''   )
					__lowercase	:       Any				=   kwargs.pop('''vision_config'''   )

					__lowercase	:       List[Any]				=   text_config.pop('''model_type'''   )
					__lowercase	:       List[str]				=   vision_config.pop('''model_type'''   )

					from transformers import AutoConfig

					__lowercase	:       Optional[Any]				=   AutoConfig.for_model(UpperCamelCase_							,		**UpperCamelCase_   )

					if vision_model_type == "clip":
								__lowercase	:       Union[str, Any]				=   AutoConfig.for_model(UpperCamelCase_							,		**UpperCamelCase_   ).vision_config
					elif vision_model_type == "clip_vision_model":
								from transformers import CLIPVisionConfig

								__lowercase	:       Optional[Any]				=   CLIPVisionConfig(**UpperCamelCase_   )
					else:
								__lowercase	:       List[str]				=   AutoConfig.for_model(UpperCamelCase_							,		**UpperCamelCase_   )

					__lowercase	:       List[str]				=   projection_dim
					__lowercase	:       Union[str, Any]				=   1.0
		@classmethod
		def 					_lowerCamelCase    (		cls							,		UpperCamelCase_							,		UpperCamelCase_							,		**UpperCamelCase_   )		->   Optional[int]:
					return cls(text_config=text_config.to_dict()							,		vision_config=vision_config.to_dict()							,		**UpperCamelCase_   )
		def 					_lowerCamelCase    (		self   )		->   List[Any]:
					__lowercase	:       List[Any]				=   copy.deepcopy(self.__dict__   )
					__lowercase	:       Tuple				=   self.text_config.to_dict()
					__lowercase	:       List[Any]				=   self.vision_config.to_dict()
					__lowercase	:       str				=   self.__class__.model_type
					return output









"""simple docstring"""




from collections import defaultdict







def       __UpperCAmelCase      (				__UpperCamelCase					):
			__lowercase	:       defaultdict[str, int]				=   defaultdict(__UpperCamelCase					)
			# Creating a dictionary containing count of each word
			for word in sentence.split():
						occurrence[word] += 1
			return occurrence


if __name__ == "__main__":
			for word, count in word_occurrence('INPUT STRING').items():
						print(F"{word}: {count}")



