"""simple docstring"""





from typing import Union

from ..utils import add_end_docstrings, is_torch_available, is_vision_available, logging
from .base import PIPELINE_INIT_ARGS, Pipeline


if is_vision_available():
				from PIL import Image

				from ..image_utils import load_image

if is_torch_available():
				from ..models.auto.modeling_auto import MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING

__A  =				logging.get_logger(__name__)
@add_end_docstrings(a__		)
class  _snake_case     (					a__		):






						def __init__(       self      :			Optional[int]							,					*UpperCAmelCase      :			Optional[Any]							,					**UpperCAmelCase      :			Any    ):
													super().__init__(*UpperCAmelCase							,					**UpperCAmelCase    )
													self.check_model_type(UpperCAmelCase    )






						def       lowerCamelCase__     (       self      :			Any							,					UpperCAmelCase      :			Union[str, Any]=None							,					UpperCAmelCase      :			List[Any]=None							,					UpperCAmelCase      :			Any=None							,					**UpperCAmelCase      :			int    ):
													__lowerCamelCase   ,  __lowerCamelCase					:		Optional[int]		   =     {}, {}
													if padding is not None:
																				__lowerCamelCase					:		int		   =     padding
													if truncation is not None:
																				__lowerCamelCase					:		Any		   =     truncation
													if top_k is not None:
																				__lowerCamelCase					:		Union[str, Any]		   =     top_k
													return preprocess_params, {}, postprocess_params






						def __call__(       self      :			List[str]							,					UpperCAmelCase      :			Union["Image.Image", str]							,					UpperCAmelCase      :			str = None							,					**UpperCAmelCase      :			Union[str, Any]    ):
													if isinstance(UpperCAmelCase							,					(Image.Image, str)    ) and isinstance(UpperCAmelCase							,					UpperCAmelCase    ):
																				__lowerCamelCase					:		Dict		   =     {"image": image, "question": question}
													else:
																				__lowerCamelCase					:		Dict		   =     image
													__lowerCamelCase					:		Optional[Any]		   =     super().__call__(UpperCAmelCase							,					**UpperCAmelCase    )
													return results






						def       lowerCamelCase__     (       self      :			List[Any]							,					UpperCAmelCase      :			int							,					UpperCAmelCase      :			Union[str, Any]=False							,					UpperCAmelCase      :			Union[str, Any]=False    ):
													__lowerCamelCase					:		Optional[int]		   =     load_image(inputs["image"]    )
													__lowerCamelCase					:		Tuple		   =     self.tokenizer(
													    inputs["question"]							,					return_tensors=self.framework							,					padding=UpperCAmelCase							,					truncation=UpperCAmelCase    )
													__lowerCamelCase					:		Union[str, Any]		   =     self.image_processor(images=UpperCAmelCase							,					return_tensors=self.framework    )
													model_inputs.update(UpperCAmelCase    )
													return model_inputs






						def       lowerCamelCase__     (       self      :			Optional[int]							,					UpperCAmelCase      :			Optional[Any]    ):
													__lowerCamelCase					:		str		   =     self.model(**UpperCAmelCase    )
													return model_outputs







						def       lowerCamelCase__     (       self      :			Any							,					UpperCAmelCase      :			Any							,					UpperCAmelCase      :			Optional[int]=5    ):
													if top_k > self.model.config.num_labels:
																				__lowerCamelCase					:		Optional[Any]		   =     self.model.config.num_labels

													if self.framework == "pt":
																				__lowerCamelCase					:		Tuple		   =     model_outputs.logits.sigmoid()[0]
																				__lowerCamelCase   ,  __lowerCamelCase					:		int		   =     probs.topk(UpperCAmelCase    )
													else:
																				raise ValueError(F"""Unsupported framework: {self.framework}"""    )

													__lowerCamelCase					:		Union[str, Any]		   =     scores.tolist()
													__lowerCamelCase					:		Union[str, Any]		   =     ids.tolist()
													return [{"score": score, "answer": self.model.config.idalabel[_id]} for score, _id in zip(UpperCAmelCase							,					UpperCAmelCase    )]
"""simple docstring"""





import math
from datetime import datetime, timedelta


def    lowercase_   (   _lowerCamelCase:	int      ) ->      datetime:



							'''simple docstring'''

							__lowerCamelCase					:		List[Any]		   =     year % 19
							__lowerCamelCase					:		List[str]		   =     year % 4
							__lowerCamelCase					:		Dict		   =     year % 7
							__lowerCamelCase					:		Optional[Any]		   =     math.floor(year / 100      )
							__lowerCamelCase					:		Tuple		   =     math.floor((13 + 8 * leap_day_inhibits) / 25      )
							__lowerCamelCase					:		List[str]		   =     leap_day_inhibits / 4
							__lowerCamelCase					:		Optional[Any]		   =     (
							    15 - lunar_orbit_correction + leap_day_inhibits - leap_day_reinstall_number
							) % 30
							__lowerCamelCase					:		Union[str, Any]		   =     (4 + leap_day_inhibits - leap_day_reinstall_number) % 7

							# days to be added to March 21
							__lowerCamelCase					:		Union[str, Any]		   =     (19 * metonic_cycle + secular_moon_shift) % 30

							# PHM -> Paschal Full Moon
							__lowerCamelCase					:		List[Any]		   =     (
							    2 * julian_leap_year
							    + 4 * non_leap_year
							    + 6 * days_to_add
							    + century_starting_point
							) % 7

							if days_to_add == 29 and days_from_phm_to_sunday == 6:
														return datetime(_lowerCamelCase						,   4						,   19      )
							elif days_to_add == 28 and days_from_phm_to_sunday == 6:
														return datetime(_lowerCamelCase						,   4						,   18      )
							else:
														return datetime(_lowerCamelCase						,   3						,   22      ) + timedelta(
														    days=int(days_to_add + days_from_phm_to_sunday      )      )


if __name__ == "__main__":
				for year in (1994, 2000, 2010, 2021, 2023):
								__A  =				'''will be''' if year > datetime.now().year else '''was'''
								print(F"""Easter in {year} {tense} {gauss_easter(year)}""")