


'''simple docstring'''






import json
import os
import re
import unittest

from transformers import CodeGenTokenizer, CodeGenTokenizerFast
from transformers.models.codegen.tokenization_codegen import VOCAB_FILES_NAMES
from transformers.testing_utils import require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin




@require_tokenizers
class 		a__    (							a__    ,    unittest.TestCase  ):





							'''simple docstring'''






							lowercase__      :       List[str]     						=				CodeGenTokenizer
							lowercase__      :       int     						=				CodeGenTokenizerFast
							lowercase__      :       int     						=				True
							lowercase__      :       List[Any]     						=				{"add_prefix_space": True}
							lowercase__      :       Dict     						=				False







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							List[Any]:
														super().setUp()

														# Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
														lowerCAmelCase__	       =     [
														    '''l''',
														    '''o''',
														    '''w''',
														    '''e''',
														    '''r''',
														    '''s''',
														    '''t''',
														    '''i''',
														    '''d''',
														    '''n''',
														    '''\u0120''',
														    '''\u0120l''',
														    '''\u0120n''',
														    '''\u0120lo''',
														    '''\u0120low''',
														    '''er''',
														    '''\u0120lowest''',
														    '''\u0120newer''',
														    '''\u0120wider''',
														    '''<unk>''',
														    '''<|endoftext|>''',
														]
														lowerCAmelCase__	       =     dict(zip(lowerCamelCase_ ,   range(len(lowerCamelCase_       )       )       )       )
														lowerCAmelCase__	       =     ['''#version: 0.2''', '''\u0120 l''', '''\u0120l o''', '''\u0120lo w''', '''e r''', '''''']
														lowerCAmelCase__	       =     {'''unk_token''': '''<unk>'''}

														lowerCAmelCase__	       =     os.path.join(self.tmpdirname ,   VOCAB_FILES_NAMES['''vocab_file''']       )
														lowerCAmelCase__	       =     os.path.join(self.tmpdirname ,   VOCAB_FILES_NAMES['''merges_file''']       )
														with open(self.vocab_file ,   '''w''' ,   encoding='''utf-8'''       ) as fp:
																					fp.write(json.dumps(lowerCamelCase_       ) + '''\n'''       )
														with open(self.merges_file ,   '''w''' ,   encoding='''utf-8'''       ) as fp:
																					fp.write('''\n'''.join(lowerCamelCase_       )       )







							def   __SCREAMING_SNAKE_CASE							(		self ,   **lowerCamelCase_       )	->							List[str]:
														kwargs.update(self.special_tokens_map       )
														return CodeGenTokenizer.from_pretrained(self.tmpdirname ,   **lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self ,   **lowerCamelCase_       )	->							List[str]:
														kwargs.update(self.special_tokens_map       )
														return CodeGenTokenizerFast.from_pretrained(self.tmpdirname ,   **lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_       )	->							List[str]:
														lowerCAmelCase__	       =     '''lower newer'''
														lowerCAmelCase__	       =     '''lower newer'''
														return input_text, output_text







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Union[str, Any]:
														lowerCAmelCase__	       =     CodeGenTokenizer(self.vocab_file ,   self.merges_file ,   **self.special_tokens_map       )
														lowerCAmelCase__	       =     '''lower newer'''
														lowerCAmelCase__	       =     ['''\u0120low''', '''er''', '''\u0120''', '''n''', '''e''', '''w''', '''er''']
														lowerCAmelCase__	       =     tokenizer.tokenize(lowerCamelCase_ ,   add_prefix_space=lowerCamelCase_       )
														self.assertListEqual(lowerCamelCase_ ,   lowerCamelCase_       )

														lowerCAmelCase__	       =     tokens + [tokenizer.unk_token]
														lowerCAmelCase__	       =     [14, 15, 10, 9, 3, 2, 15, 19]
														self.assertListEqual(tokenizer.convert_tokens_to_ids(lowerCamelCase_       ) ,   lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Optional[Any]:
														if not self.test_rust_tokenizer:
																					return

														lowerCAmelCase__	       =     self.get_tokenizer()
														lowerCAmelCase__	       =     self.get_rust_tokenizer(add_prefix_space=lowerCamelCase_       )

														lowerCAmelCase__	       =     '''lower newer'''

														# Testing tokenization
														lowerCAmelCase__	       =     tokenizer.tokenize(lowerCamelCase_ ,   add_prefix_space=lowerCamelCase_       )
														lowerCAmelCase__	       =     rust_tokenizer.tokenize(lowerCamelCase_       )
														self.assertListEqual(lowerCamelCase_ ,   lowerCamelCase_       )

														# Testing conversion to ids without special tokens
														lowerCAmelCase__	       =     tokenizer.encode(lowerCamelCase_ ,   add_special_tokens=lowerCamelCase_ ,   add_prefix_space=lowerCamelCase_       )
														lowerCAmelCase__	       =     rust_tokenizer.encode(lowerCamelCase_ ,   add_special_tokens=lowerCamelCase_       )
														self.assertListEqual(lowerCamelCase_ ,   lowerCamelCase_       )

														# Testing conversion to ids with special tokens
														lowerCAmelCase__	       =     self.get_rust_tokenizer(add_prefix_space=lowerCamelCase_       )
														lowerCAmelCase__	       =     tokenizer.encode(lowerCamelCase_ ,   add_prefix_space=lowerCamelCase_       )
														lowerCAmelCase__	       =     rust_tokenizer.encode(lowerCamelCase_       )
														self.assertListEqual(lowerCamelCase_ ,   lowerCamelCase_       )

														# Testing the unknown token
														lowerCAmelCase__	       =     tokens + [rust_tokenizer.unk_token]
														lowerCAmelCase__	       =     [14, 15, 10, 9, 3, 2, 15, 19]
														self.assertListEqual(rust_tokenizer.convert_tokens_to_ids(lowerCamelCase_       ) ,   lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self ,   *lowerCamelCase_ ,   **lowerCamelCase_       )	->							str:
														# It's very difficult to mix/test pretokenization with byte-level
														# And get both CodeGen and Roberta to work at the same time (mostly an issue of adding a space before the string)
														pass







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_=15       )	->							List[Any]:
														for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
																					with self.subTest(F"""{tokenizer.__class__.__name__} ({pretrained_name})"""       ):
																												lowerCAmelCase__	       =     self.rust_tokenizer_class.from_pretrained(lowerCamelCase_ ,   **lowerCamelCase_       )

																												# Simple input
																												lowerCAmelCase__	       =     '''This is a simple input'''
																												lowerCAmelCase__	       =     ['''This is a simple input 1''', '''This is a simple input 2''']
																												lowerCAmelCase__	       =     ('''This is a simple input''', '''This is a pair''')
																												lowerCAmelCase__	       =     [
																												    ('''This is a simple input 1''', '''This is a simple input 2'''),
																												    ('''This is a simple pair 1''', '''This is a simple pair 2'''),
																												]

																												# Simple input tests
																												self.assertRaises(lowerCamelCase_ ,   tokenizer_r.encode ,   lowerCamelCase_ ,   max_length=lowerCamelCase_ ,   padding='''max_length'''       )

																												# Simple input
																												self.assertRaises(lowerCamelCase_ ,   tokenizer_r.encode_plus ,   lowerCamelCase_ ,   max_length=lowerCamelCase_ ,   padding='''max_length'''       )

																												# Simple input
																												self.assertRaises(
																												    lowerCamelCase_ ,   tokenizer_r.batch_encode_plus ,   lowerCamelCase_ ,   max_length=lowerCamelCase_ ,   padding='''max_length''' ,   )

																												# Pair input
																												self.assertRaises(lowerCamelCase_ ,   tokenizer_r.encode ,   lowerCamelCase_ ,   max_length=lowerCamelCase_ ,   padding='''max_length'''       )

																												# Pair input
																												self.assertRaises(lowerCamelCase_ ,   tokenizer_r.encode_plus ,   lowerCamelCase_ ,   max_length=lowerCamelCase_ ,   padding='''max_length'''       )

																												# Pair input
																												self.assertRaises(
																												    lowerCamelCase_ ,   tokenizer_r.batch_encode_plus ,   lowerCamelCase_ ,   max_length=lowerCamelCase_ ,   padding='''max_length''' ,   )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							List[Any]:
														lowerCAmelCase__	       =     CodeGenTokenizer.from_pretrained(self.tmpdirname ,   pad_token='''<pad>'''       )

														# Simple input
														lowerCAmelCase__	       =     '''This is a simple input'''
														lowerCAmelCase__	       =     ['''This is a simple input looooooooong''', '''This is a simple input''']
														lowerCAmelCase__	       =     ('''This is a simple input''', '''This is a pair''')
														lowerCAmelCase__	       =     [
														    ('''This is a simple input loooooong''', '''This is a simple input'''),
														    ('''This is a simple pair loooooong''', '''This is a simple pair'''),
														]

														lowerCAmelCase__	       =     tokenizer.pad_token_id

														lowerCAmelCase__	       =     tokenizer(lowerCamelCase_ ,   padding='''max_length''' ,   max_length=30 ,   return_tensors='''np'''       )
														lowerCAmelCase__	       =     tokenizer(lowerCamelCase_ ,   padding=lowerCamelCase_ ,   truncate=lowerCamelCase_ ,   return_tensors='''np'''       )
														lowerCAmelCase__	       =     tokenizer(*lowerCamelCase_ ,   padding='''max_length''' ,   max_length=60 ,   return_tensors='''np'''       )
														lowerCAmelCase__	       =     tokenizer(lowerCamelCase_ ,   padding=lowerCamelCase_ ,   truncate=lowerCamelCase_ ,   return_tensors='''np'''       )

														# s
														# test single string max_length padding
														self.assertEqual(out_s['''input_ids'''].shape[-1] ,   30       )
														self.assertTrue(pad_token_id in out_s['''input_ids''']       )
														self.assertTrue(0 in out_s['''attention_mask''']       )

														# s2
														# test automatic padding
														self.assertEqual(out_sa['''input_ids'''].shape[-1] ,   33       )
														# long slice doesn't have padding
														self.assertFalse(pad_token_id in out_sa['''input_ids'''][0]       )
														self.assertFalse(0 in out_sa['''attention_mask'''][0]       )
														# short slice does have padding
														self.assertTrue(pad_token_id in out_sa['''input_ids'''][1]       )
														self.assertTrue(0 in out_sa['''attention_mask'''][1]       )

														# p
														# test single pair max_length padding
														self.assertEqual(out_p['''input_ids'''].shape[-1] ,   60       )
														self.assertTrue(pad_token_id in out_p['''input_ids''']       )
														self.assertTrue(0 in out_p['''attention_mask''']       )

														# p2
														# test automatic padding pair
														self.assertEqual(out_pa['''input_ids'''].shape[-1] ,   52       )
														# long slice pair doesn't have padding
														self.assertFalse(pad_token_id in out_pa['''input_ids'''][0]       )
														self.assertFalse(0 in out_pa['''attention_mask'''][0]       )
														# short slice pair does have padding
														self.assertTrue(pad_token_id in out_pa['''input_ids'''][1]       )
														self.assertTrue(0 in out_pa['''attention_mask'''][1]       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							int:
														lowerCAmelCase__	       =     '''$$$'''
														lowerCAmelCase__	       =     CodeGenTokenizer.from_pretrained(self.tmpdirname ,   bos_token=lowerCamelCase_ ,   add_bos_token=lowerCamelCase_       )

														lowerCAmelCase__	       =     '''This is a simple input'''
														lowerCAmelCase__	       =     ['''This is a simple input 1''', '''This is a simple input 2''']

														lowerCAmelCase__	       =     tokenizer.bos_token_id

														lowerCAmelCase__	       =     tokenizer(lowerCamelCase_       )
														lowerCAmelCase__	       =     tokenizer(lowerCamelCase_       )

														self.assertEqual(out_s.input_ids[0] ,   lowerCamelCase_       )
														self.assertTrue(all(o[0] == bos_token_id for o in out_sa.input_ids       )       )

														lowerCAmelCase__	       =     tokenizer.decode(out_s.input_ids       )
														lowerCAmelCase__	       =     tokenizer.batch_decode(out_sa.input_ids       )

														self.assertEqual(decode_s.split()[0] ,   lowerCamelCase_       )
														self.assertTrue(all(d.split()[0] == bos_token for d in decode_sa       )       )







							@slow
							def   __SCREAMING_SNAKE_CASE							(		self       )	->							List[str]:
														lowerCAmelCase__	       =     CodeGenTokenizer.from_pretrained('''Salesforce/codegen-350M-mono'''       )

														lowerCAmelCase__	       =     '''\nif len_a > len_b:\n    result = a\nelse:\n    result = b\n\n\n\n#'''
														lowerCAmelCase__	       =     '''\nif len_a > len_b:      result = a\nelse:      result = b'''

														lowerCAmelCase__	       =     tokenizer.encode(lowerCamelCase_       )
														lowerCAmelCase__	       =     ['''^#''', re.escape('''<|endoftext|>'''       ), '''^\'\'\'''', '''^"""''', '''\n\n\n''']
														lowerCAmelCase__	       =     tokenizer.decode(lowerCamelCase_ ,   truncate_before_pattern=lowerCamelCase_       )
														self.assertEqual(lowerCamelCase_ ,   lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Union[str, Any]:
														pass



'''simple docstring'''






import unittest

from transformers import (
    MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING,
    TF_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING,
    TextClassificationPipeline,
    pipeline,
)
from transformers.testing_utils import is_pipeline_test, nested_simplify, require_tf, require_torch, slow

from .test_pipelines_common import ANY


# These 2 model types require different inputs than those of the usual text models.
__UpperCAmelCase       =							{'''LayoutLMv2Config''', '''LayoutLMv3Config'''}




@is_pipeline_test
class 		a__    (							unittest.TestCase  ):





							'''simple docstring'''






							lowercase__      :       Optional[Any]     						=				MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING
							lowercase__      :       List[Any]     						=				TF_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING

							if model_mapping is not None:
														lowercase__      :       Optional[Any]     						=				{config: model for config, model in model_mapping.items() if config.__name__ not in _TO_SKIP}
							if tf_model_mapping is not None:
														lowercase__      :       Tuple     						=				{
														    config: model for config, model in tf_model_mapping.items() if config.__name__ not in _TO_SKIP
														}







							@require_torch
							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Optional[int]:
														lowerCAmelCase__	       =     pipeline(
														    task='''text-classification''' ,   model='''hf-internal-testing/tiny-random-distilbert''' ,   framework='''pt'''       )

														lowerCAmelCase__	       =     text_classifier('''This is great !'''       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''LABEL_0''', '''score''': 0.504}]       )

														lowerCAmelCase__	       =     text_classifier('''This is great !''' ,   top_k=2       )
														self.assertEqual(
														    nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''LABEL_0''', '''score''': 0.504}, {'''label''': '''LABEL_1''', '''score''': 0.496}]       )

														lowerCAmelCase__	       =     text_classifier(['''This is great !''', '''This is bad'''] ,   top_k=2       )
														self.assertEqual(
														    nested_simplify(lowerCamelCase_       ) ,   [
														        [{'''label''': '''LABEL_0''', '''score''': 0.504}, {'''label''': '''LABEL_1''', '''score''': 0.496}],
														        [{'''label''': '''LABEL_0''', '''score''': 0.504}, {'''label''': '''LABEL_1''', '''score''': 0.496}],
														    ] ,   )

														lowerCAmelCase__	       =     text_classifier('''This is great !''' ,   top_k=1       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''LABEL_0''', '''score''': 0.504}]       )

														# Legacy behavior
														lowerCAmelCase__	       =     text_classifier('''This is great !''' ,   return_all_scores=lowerCamelCase_       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''LABEL_0''', '''score''': 0.504}]       )

														lowerCAmelCase__	       =     text_classifier('''This is great !''' ,   return_all_scores=lowerCamelCase_       )
														self.assertEqual(
														    nested_simplify(lowerCamelCase_       ) ,   [[{'''label''': '''LABEL_0''', '''score''': 0.504}, {'''label''': '''LABEL_1''', '''score''': 0.496}]]       )

														lowerCAmelCase__	       =     text_classifier(['''This is great !''', '''Something else'''] ,   return_all_scores=lowerCamelCase_       )
														self.assertEqual(
														    nested_simplify(lowerCamelCase_       ) ,   [
														        [{'''label''': '''LABEL_0''', '''score''': 0.504}, {'''label''': '''LABEL_1''', '''score''': 0.496}],
														        [{'''label''': '''LABEL_0''', '''score''': 0.504}, {'''label''': '''LABEL_1''', '''score''': 0.496}],
														    ] ,   )

														lowerCAmelCase__	       =     text_classifier(['''This is great !''', '''Something else'''] ,   return_all_scores=lowerCamelCase_       )
														self.assertEqual(
														    nested_simplify(lowerCamelCase_       ) ,   [
														        {'''label''': '''LABEL_0''', '''score''': 0.504},
														        {'''label''': '''LABEL_0''', '''score''': 0.504},
														    ] ,   )







							@require_torch
							def   __SCREAMING_SNAKE_CASE							(		self       )	->							int:
														import torch

														lowerCAmelCase__	       =     pipeline(
														    task='''text-classification''' ,   model='''hf-internal-testing/tiny-random-distilbert''' ,   framework='''pt''' ,   device=torch.device('''cpu'''       ) ,   )

														lowerCAmelCase__	       =     text_classifier('''This is great !'''       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''LABEL_0''', '''score''': 0.504}]       )







							@require_tf
							def   __SCREAMING_SNAKE_CASE							(		self       )	->							str:
														lowerCAmelCase__	       =     pipeline(
														    task='''text-classification''' ,   model='''hf-internal-testing/tiny-random-distilbert''' ,   framework='''tf'''       )

														lowerCAmelCase__	       =     text_classifier('''This is great !'''       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''LABEL_0''', '''score''': 0.504}]       )







							@slow
							@require_torch
							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Dict:
														lowerCAmelCase__	       =     pipeline('''text-classification'''       )

														lowerCAmelCase__	       =     text_classifier('''This is great !'''       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''POSITIVE''', '''score''': 1.0}]       )
														lowerCAmelCase__	       =     text_classifier('''This is bad !'''       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''NEGATIVE''', '''score''': 1.0}]       )
														lowerCAmelCase__	       =     text_classifier('''Birds are a type of animal'''       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''POSITIVE''', '''score''': 0.988}]       )







							@slow
							@require_tf
							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Optional[Any]:
														lowerCAmelCase__	       =     pipeline('''text-classification''' ,   framework='''tf'''       )

														lowerCAmelCase__	       =     text_classifier('''This is great !'''       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''POSITIVE''', '''score''': 1.0}]       )
														lowerCAmelCase__	       =     text_classifier('''This is bad !'''       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''NEGATIVE''', '''score''': 1.0}]       )
														lowerCAmelCase__	       =     text_classifier('''Birds are a type of animal'''       )
														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': '''POSITIVE''', '''score''': 0.988}]       )







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_       )	->							Tuple:
														lowerCAmelCase__	       =     TextClassificationPipeline(model=lowerCamelCase_ ,   tokenizer=lowerCamelCase_       )
														return text_classifier, ["HuggingFace is in", "This is another test"]







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_       )	->							Union[str, Any]:
														lowerCAmelCase__	       =     text_classifier.model
														# Small inputs because BartTokenizer tiny has maximum position embeddings = 22
														lowerCAmelCase__	       =     '''HuggingFace is in'''
														lowerCAmelCase__	       =     text_classifier(lowerCamelCase_       )

														self.assertEqual(nested_simplify(lowerCamelCase_       ) ,   [{'''label''': ANY(lowerCamelCase_       ), '''score''': ANY(lowerCamelCase_       )}]       )
														self.assertTrue(outputs[0]['''label'''] in model.config.idalabel.values()       )

														lowerCAmelCase__	       =     ['''HuggingFace is in ''', '''Paris is in France''']
														lowerCAmelCase__	       =     text_classifier(lowerCamelCase_       )
														self.assertEqual(
														    nested_simplify(lowerCamelCase_       ) ,   [{'''label''': ANY(lowerCamelCase_       ), '''score''': ANY(lowerCamelCase_       )}, {'''label''': ANY(lowerCamelCase_       ), '''score''': ANY(lowerCamelCase_       )}] ,   )
														self.assertTrue(outputs[0]['''label'''] in model.config.idalabel.values()       )
														self.assertTrue(outputs[1]['''label'''] in model.config.idalabel.values()       )

														# Forcing to get all results with `top_k=None`
														# This is NOT the legacy format
														lowerCAmelCase__	       =     text_classifier(lowerCamelCase_ ,   top_k=lowerCamelCase_       )
														lowerCAmelCase__	       =     len(model.config.idalabel.values()       )
														self.assertEqual(
														    nested_simplify(lowerCamelCase_       ) ,   [[{'''label''': ANY(lowerCamelCase_       ), '''score''': ANY(lowerCamelCase_       )}] * N, [{'''label''': ANY(lowerCamelCase_       ), '''score''': ANY(lowerCamelCase_       )}] * N] ,   )

														lowerCAmelCase__	       =     {'''text''': '''HuggingFace is in ''', '''text_pair''': '''Paris is in France'''}
														lowerCAmelCase__	       =     text_classifier(lowerCamelCase_       )
														self.assertEqual(
														    nested_simplify(lowerCamelCase_       ) ,   {'''label''': ANY(lowerCamelCase_       ), '''score''': ANY(lowerCamelCase_       )} ,   )
														self.assertTrue(outputs['''label'''] in model.config.idalabel.values()       )

														# This might be used a text pair, but tokenizer + pipe interaction
														# makes it hard to understand that it's not using the pair properly
														# https://github.com/huggingface/transformers/issues/17305
														# We disabled this usage instead as it was outputting wrong outputs.
														lowerCAmelCase__	       =     [['''HuggingFace is in ''', '''Paris is in France''']]
														with self.assertRaises(lowerCamelCase_       ):
																					text_classifier(lowerCamelCase_       )

														# This used to be valid for doing text pairs
														# We're keeping it working because of backward compatibility
														lowerCAmelCase__	       =     text_classifier([[['''HuggingFace is in ''', '''Paris is in France''']]]       )
														self.assertEqual(
														    nested_simplify(lowerCamelCase_       ) ,   [{'''label''': ANY(lowerCamelCase_       ), '''score''': ANY(lowerCamelCase_       )}] ,   )
														self.assertTrue(outputs[0]['''label'''] in model.config.idalabel.values()       )