




'''simple docstring'''




# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from ..models.auto import AutoModelForSeqaSeqLM, AutoTokenizer
from .base import PipelineTool

class     lowerCAmelCase_ (			_UpperCamelCase ):







  '''simple docstring'''







  lowerCAmelCase_					:       Optional[int]					  =    '''philschmid/bart-large-cnn-samsum'''
  lowerCAmelCase_					:       Optional[int]					  =    (
      '''This is a tool that summarizes an English text. It takes an input `text` containing the text to summarize, '''
      '''and returns a summary of the text.'''
  )
  lowerCAmelCase_					:       Any					  =    '''summarizer'''
  lowerCAmelCase_					:       str					  =    AutoTokenizer
  lowerCAmelCase_					:       List[str]					  =    AutoModelForSeqaSeqLM

  lowerCAmelCase_					:       Optional[Any]					  =    ['''text''']
  lowerCAmelCase_					:       Tuple					  =    ['''text''']


  def 				SCREAMING_SNAKE_CASE__      (    self     :						List[Any]    ,		_UpperCAmelCase     :						Optional[int]			):






   """simple docstring"""






   return self.pre_processor(lowercase__    ,		return_tensors="""pt"""    ,		truncation=lowercase__			)


  def 				SCREAMING_SNAKE_CASE__      (    self     :						Optional[int]    ,		_UpperCAmelCase     :						List[Any]			):






   """simple docstring"""






   return self.model.generate(**lowercase__			)[0]



  def 				SCREAMING_SNAKE_CASE__      (    self     :						str    ,		_UpperCAmelCase     :						Optional[int]			):






   """simple docstring"""






   return self.pre_processor.decode(lowercase__    ,		skip_special_tokens=lowercase__    ,		clean_up_tokenization_spaces=lowercase__			)




def     __SCREAMING_SNAKE_CASE							(       )		->     Optional[int]:




						'''simple docstring'''







						__UpperCAmelCase			:							str	    =	[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

						__UpperCAmelCase			:							Union[str, Any]	    =	6
						__UpperCAmelCase			:							Optional[Any]	    =	1
						__UpperCAmelCase			:							Tuple	    =	1901

						__UpperCAmelCase			:							Any	    =	0

						while year < 2001:
												day += 7

												if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
																		if day > days_per_month[month - 1] and month != 2:
																								month += 1
																								__UpperCAmelCase			:							Optional[int]	    =	day - days_per_month[month - 2]
																		elif day > 29 and month == 2:
																								month += 1
																								__UpperCAmelCase			:							Optional[Any]	    =	day - 29
												else:
																		if day > days_per_month[month - 1]:
																								month += 1
																								__UpperCAmelCase			:							Optional[Any]	    =	day - days_per_month[month - 2]

												if month > 12:
																		year += 1
																		__UpperCAmelCase			:							int	    =	1

												if year < 2001 and day == 1:
																		sundays += 1
						return sundays


if __name__ == "__main__":
				print(solution())

