prasadnu commited on
Commit
485568d
·
1 Parent(s): 63c9f19

RAG changes

Browse files
Files changed (1) hide show
  1. RAG/colpali.py +5 -2
RAG/colpali.py CHANGED
@@ -61,7 +61,8 @@ endpoint_name = "colpali-endpoint"
61
 
62
 
63
  # Create a SageMaker runtime client
64
- runtime = boto3.client("sagemaker-runtime", region_name=region_endpoint)
 
65
 
66
  # Prepare your payload (e.g., text-only input)
67
 
@@ -79,7 +80,9 @@ def call_nova(
79
  tools=None,
80
  verbose=False,
81
  ):
82
- client = boto3.client("bedrock-runtime",region_name=region_endpoint)
 
 
83
  system_list = [{"text": system_message}]
84
  inf_params = {
85
  "max_new_tokens": max_tokens,
 
61
 
62
 
63
  # Create a SageMaker runtime client
64
+ runtime = boto3.client("sagemaker-runtime",aws_access_key_id=st.secrets['user_access_key'],
65
+ aws_secret_access_key=st.secrets['user_secret_key'], region_name=region_endpoint)
66
 
67
  # Prepare your payload (e.g., text-only input)
68
 
 
80
  tools=None,
81
  verbose=False,
82
  ):
83
+ client = boto3.client('bedrock-runtime',
84
+ aws_access_key_id=st.secrets['user_access_key'],
85
+ aws_secret_access_key=st.secrets['user_secret_key'], region_name = region_endpoint)
86
  system_list = [{"text": system_message}]
87
  inf_params = {
88
  "max_new_tokens": max_tokens,