
import unittest

from transformers import is_torch_available, is_vision_available
from transformers.testing_utils import require_torch, require_vision, slow, torch_device


if is_torch_available():
					import torch

					from transformers import AutoModelForImageClassification

if is_vision_available():
					from transformers import AutoImageProcessor


@require_torch
@require_vision
class 				lowercase					(		unittest.TestCase   ):



		@slow
		def __UpperCamelCase ( self       )  ->					Optional[Any]:
				"""simple docstring"""
				UpperCamelCase		=     AutoImageProcessor.from_pretrained('microsoft/dit-base-finetuned-rvlcdip'       )
				UpperCamelCase		=     AutoModelForImageClassification.from_pretrained('microsoft/dit-base-finetuned-rvlcdip'       )
				model.to(__lowercase       )

				from datasets import load_dataset

				UpperCamelCase		=     load_dataset('nielsr/rvlcdip-demo'       )

				UpperCamelCase		=     dataset['train'][0]['image'].convert('RGB'       )

				UpperCamelCase		=     image_processor(__lowercase				,      return_tensors='pt'       ).to(__lowercase       )

				# forward pass
				with torch.no_grad():
						UpperCamelCase		=     model(**__lowercase       )
						UpperCamelCase		=     outputs.logits

				UpperCamelCase		=     torch.Size((1, 16)       )
				self.assertEqual(logits.shape				,      __lowercase       )

				UpperCamelCase		=     torch.tensor(
				    [-0.4158, -0.4092, -0.4347]				,      device=__lowercase				,      dtype=torch.float				,      )
				self.assertTrue(torch.allclose(logits[0, :3]				,      __lowercase				,      atol=1e-4       )       )






def 						lowerCamelCase__    (		_A							):







	'''simple docstring'''





	snake_case_		    =     len(_A							)
	for i in range(_A							):
		for j in range(i + 1     ,	_A							):
			if numbers[j] < numbers[i]:
				snake_case_    ,      snake_case_		    =     numbers[j], numbers[i]
	return numbers


if __name__ == "__main__":
		lowercase__				:     int 		=						input("Enter numbers separated by a comma:\n").strip()
		lowercase__				:     Any 		=						[int(item) for item in user_input.split(",")]
		print(exchange_sort(unsorted))
