
# 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.
import re

from ..utils import cached_file


# docstyle-ignore
__lowerCAmelCase					   =       '\nHuman: <<task>>\n\nAssistant: '


__lowerCAmelCase					   =       'huggingface-tools/default-prompts'
__lowerCAmelCase					   =       {'chat': 'chat_prompt_template.txt', 'run': 'run_prompt_template.txt'}


def    a      ( a		,						a		,						a="run"	)     ->str:




			'''simple docstring'''


			if prompt_or_repo_id is None:
						SCREAMING_SNAKE_CASE     						= DEFAULT_PROMPTS_REPO

			# prompt is considered a repo ID when it does not contain any kind of space
			if re.search('''\\s'''		,						a	) is not None:
						return prompt_or_repo_id

			SCREAMING_SNAKE_CASE     						= cached_file(
			    a		,						PROMPT_FILES[mode]		,						repo_type='''dataset'''		,						user_agent={'''agent''': agent_name}	)
			with open(a		,						'''r'''		,						encoding='''utf-8'''	) as f:
						return f.read()

# Function to print upper half of diamond (pyramid)


def    a      ( a	)     ->Optional[Any]:




			'''simple docstring'''


			for i in range(0		,						a	):
						for _ in range(0		,						n - i - 1	):  # printing spaces
									print(''' '''		,						end=''''''	)
						for _ in range(0		,						i + 1	):  # printing stars
									print('''* '''		,						end=''''''	)
						print()


def    a      ( a	)     ->Union[str, Any]:




			'''simple docstring'''


			for i in range(a		,						0		,						-1	):
						for _ in range(a		,						0		,						-1	):  # printing stars
									print('''* '''		,						end=''''''	)
						print()
						for _ in range(n - i + 1		,						0		,						-1	):  # printing spaces
									print(''' '''		,						end=''''''	)


def    a      ( a	)     ->Optional[int]:




			'''simple docstring'''


			if n <= 0:
						print('''       ...       ....        nothing printing :('''	)
						return
			floyd(a	)  # upper half
			reverse_floyd(a	)  # lower half


if __name__ == "__main__":
							print(R'| /\ | |- |  |-  |--| |\  /| |-')
							print(R'|/  \| |- |_ |_  |__| | \/ | |_')
							__lowerCAmelCase					   =       1
							while K:
														__lowerCAmelCase					   =       int(input('enter the number and , and see the magic : '))
														print()
														pretty_print(user_number)
														__lowerCAmelCase					   =       int(input('press 0 to exit... and 1 to continue...'))

							print('Good Bye...')