Skip to content

Instantly share code, notes, and snippets.

View robshox's full-sized avatar

Rob Shocks robshox

View GitHub Profile
@robshox
robshox / gist:6f7ad341d1878d8a988b2d6a0eb69bf4
Created August 10, 2023 11:46
Function Code and JSON prompt for tutorial from Rob Shocks on AWS LLAMA 2
## LAMNDA FUNCTION lambda_function.py
import boto3
import json
# grab environment variables
ENDPOINT_NAME = "jumpstart-dft-meta-textgeneration-llama-2-7b-rs"
runtime= boto3.client('runtime.sagemaker')
def lambda_handler(event, context):