<jupyter_start><jupyter_text>Invoke the Pipeline endpoint   Imports<jupyter_code>import boto3
import json<jupyter_output><empty_output><jupyter_text>Essentials<jupyter_code>sagemaker = boto3.client('sagemaker-runtime')
endpoint = 'huggingface-tensorflow-inference-2021-07-19-03-59-06-208'<jupyter_output><empty_output><jupyter_text>Invoke endpoint<jupyter_code>payload = {'inputs': 'If you are looking to sit on the edge of your seat for two hours, welcome!'}
response = sagemaker.invoke_endpoint(EndpointName=endpoint, 
                                     Body=json.dumps(payload), 
                                     ContentType='application/json')
response
prediction = json.loads(response['Body'].read().decode())[0]
prediction<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.112565445026178, 'fraction_numerical': 0.02617801047120419, 'mean_word_length': 4.583941605839416, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '219218', 'license': 'Apache-2.0', 'n_tokens_mistral': 256, 'n_tokens_neox': 241, 'n_words': 37, 'path': 'test_endpoint.ipynb', 'repo_name': 'arunprsh/nlp-e2e', 'size': '764'}