File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
python/example_code/bedrock-runtime/models/anthropic_claude Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1212 read_timeout = 1000 ,
1313)
1414# Create a Bedrock Runtime client in the AWS Region you want to use.
15- session = boto3 .session .Session (region_name = 'us-west-2 ' )
15+ session = boto3 .session .Session (region_name = 'us-east-1 ' )
1616bedrock_runtime = session .client (service_name = 'bedrock-runtime' ,
1717 config = config )
18+ pdf_path = input ("Enter the path to the PDF file: " )
1819prompt = """
1920Please analyze this PDF document and provide the following information:
2021
2930
3031# Set the model ID
3132
32- SONNET_V2_MODEL_ID = "anthropic.claude-3-5-sonnet-20241022-v2:0"
33-
33+ # SONNET_V2_MODEL_ID = "anthropic.claude-3-5-sonnet-20241022-v2:0"
34+ SONNET_V2_MODEL_ID = "us.anthropic.claude-3-5-sonnet-20241022-v2:0"
3435def optimize_reel_prompt (user_prompt ,ref_image ):
3536 # open PDF
3637 with open (ref_image , "rb" ) as f :
@@ -74,5 +75,5 @@ def optimize_reel_prompt(user_prompt,ref_image):
7475 return text
7576
7677if __name__ == "__main__" :
77- txt = optimize_reel_prompt (prompt ,"/Path/To/your.pdf" )
78+ txt = optimize_reel_prompt (prompt ,pdf_path )
7879 print (txt )
You can’t perform that action at this time.
0 commit comments