



"""simple docstring"""





def 						__lowerCAmelCase    (		__UpperCamelCase   :      int     ):


						'''simple docstring'''






						if divisor % 5 == 0 or divisor % 2 == 0:
												return 0
						snake_case_ :			Any            =      1
						snake_case_ :			Optional[int]            =      1
						while repunit:
												snake_case_ :			Optional[int]            =      (1_0 * repunit + 1) % divisor
												repunit_index += 1
						return repunit_index
def 						__lowerCAmelCase    (		__UpperCamelCase   :      int = 1_0_0_0_0_0_0     ):


						'''simple docstring'''






						snake_case_ :			Tuple            =      limit - 1
						if divisor % 2 == 0:
												divisor += 1
						while least_divisible_repunit(__UpperCamelCase     ) <= limit:
												divisor += 2
						return divisor


if __name__ == "__main__":
					print(F'''{solution() = }''')








# 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     ):
 UpperCAmelCase__						=						"""philschmid/bart-large-cnn-samsum"""
 UpperCAmelCase__						=						(
     """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."""
 )
 UpperCAmelCase__						=						"""summarizer"""
 UpperCAmelCase__						=						AutoTokenizer
 UpperCAmelCase__						=						AutoModelForSeqaSeqLM

 UpperCAmelCase__						=						["""text"""]
 UpperCAmelCase__						=						["""text"""]
 def 	A_      ( self    : Tuple     ,	UpperCAmelCase    : List[Any]      )     ->      List[str]:
     return self.pre_processor(UpperCAmelCase     ,	return_tensors='pt'     ,	truncation=UpperCAmelCase      )
 def 	A_      ( self    : Optional[int]     ,	UpperCAmelCase    : Dict      )     ->      str:
     return self.model.generate(**UpperCAmelCase      )[0]







 def 	A_      ( self    : Tuple     ,	UpperCAmelCase    : List[Any]      )     ->      Union[str, Any]:
     return self.pre_processor.decode(UpperCAmelCase     ,	skip_special_tokens=UpperCAmelCase     ,	clean_up_tokenization_spaces=UpperCAmelCase      )





