Skip to content

Commit

Permalink
tested and updated genai notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Apr 5, 2024
1 parent 0006ec8 commit b3ea5a3
Show file tree
Hide file tree
Showing 5 changed files with 178 additions and 146 deletions.
64 changes: 33 additions & 31 deletions notebooks/GenAI/AWS_Bedrock_Intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"tags": []
},
"source": [
"![bedrock_overview](../../../docs/images/bedrock_page.png)"
"![bedrock_overview](../../docs/images/bedrock_page.png)"
]
},
{
Expand All @@ -85,7 +85,9 @@
"- Titan Embeddings G1 - Text\n",
"- Claude (need to submit a use case)\n",
"\n",
"You are only charged when you use the model unlike jumpstart where you turn on an endpoint and are charged as long as its running, more detail can be found [here](https://aws.amazon.com/bedrock/pricing/)."
"You are only charged when you use the model unlike jumpstart where you turn on an endpoint and are charged as long as its running, more detail can be found [here](https://aws.amazon.com/bedrock/pricing/).\n",
"\n",
"**Warning:** Do not forget to opt out of sharing your data before requesting access to this models!"
]
},
{
Expand All @@ -95,7 +97,7 @@
"tags": []
},
"source": [
"![bedrock_models](../../../docs/images/bedrock_model_access.png)"
"![bedrock_models](../../docs/images/bedrock_model_access.png)"
]
},
{
Expand Down Expand Up @@ -127,7 +129,7 @@
"id": "8f8c3521-ca5a-4c74-bc44-6ee18261db97",
"metadata": {},
"source": [
"![bedrock_chat_playground_1](../../../docs/images/bedrock_chat_playground_1.png)"
"![bedrock_chat_playground_1](../../docs/images/bedrock_chat_playground_1.png)"
]
},
{
Expand All @@ -143,7 +145,7 @@
"id": "51e613aa-de17-4344-91fe-e65497364a2d",
"metadata": {},
"source": [
"![bedrock_chat_playground_2](../../../docs/images/bedrock_chat_playground_2.png)"
"![bedrock_chat_playground_2](../../docs/images/bedrock_chat_playground_2.png)"
]
},
{
Expand All @@ -162,7 +164,7 @@
"id": "1210bcc7-7084-414e-bc67-ec5a712c54fa",
"metadata": {},
"source": [
"![bedrock_chat_playground_4](../../../docs/images/bedrock_chat_playground_4.png)"
"![bedrock_chat_playground_4](../../docs/images/bedrock_chat_playground_4.png)"
]
},
{
Expand Down Expand Up @@ -201,7 +203,7 @@
"tags": []
},
"source": [
"![bedrock_chat_playground_3](../../../docs/images/bedrock_chat_playground_3.png)"
"![bedrock_chat_playground_3](../../docs/images/bedrock_chat_playground_3.png)"
]
},
{
Expand All @@ -227,7 +229,7 @@
"source": [
"### Load in data\n",
"\n",
"Below we are creating a bucket to store our articles, then we will copy the metadata from the PubMed bucket and parse that to only list the path of the first 100 articles within that bucket. The last step will be to copy those articles to our bucket."
"Below we are creating a bucket to store our articles, then we will copy the metadata from the PubMed bucket and parse that to only list the path of the first 50 articles within that bucket. The last step will be to copy those articles to our bucket."
]
},
{
Expand All @@ -239,12 +241,12 @@
"source": [
"#make bucket, dont forget to add your own bucket name\n",
"bucket = 'pubmed-chat-docs'\n",
"!aws s3 mb s3://{bucket}\n"
"!aws s3 mb s3://{bucket}"
]
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 1,
"id": "cbfffd09-7983-419b-a081-7f1cd7e98736",
"metadata": {
"tags": []
Expand Down Expand Up @@ -274,10 +276,10 @@
"import pandas as pd\n",
"import os\n",
"df = pd.read_csv('oa_comm.filelist.csv')\n",
"#first 100 files\n",
"first_100=df[0:100]\n",
"#first 50 files\n",
"first_50=df[0:50]\n",
"#save new metadata\n",
"first_100.to_csv('oa_comm.filelist_100.csv', index=False)"
"first_50.to_csv('oa_comm.filelist_100.csv', index=False)"
]
},
{
Expand All @@ -289,7 +291,7 @@
"source": [
"import os\n",
"#gather path to files in bucket\n",
"for i in first_100['Key']:\n",
"for i in first_50['Key']:\n",
" os.system(f'aws s3 cp s3://pmc-oa-opendata/{i} s3://{bucket}/docs/ --sse')"
]
},
Expand All @@ -316,7 +318,7 @@
"tags": []
},
"source": [
"![bedrock_knowledgebase_1](../../../docs/images/bedrock_knowledgebase_1.png)"
"![bedrock_knowledgebase_1](../../docs/images/bedrock_knowledgebase_1.png)"
]
},
{
Expand All @@ -332,7 +334,7 @@
"id": "c4a53f7b-da0f-4ef1-bc78-fed8f411fb7c",
"metadata": {},
"source": [
"![bedrock_knowledgebase_2](../../../docs/images/bedrock_knowledgebase_2.png)"
"![bedrock_knowledgebase_2](../../docs/images/bedrock_knowledgebase_2.png)"
]
},
{
Expand All @@ -348,7 +350,7 @@
"id": "b815514d-d9a6-4a2b-b46e-b8b928451138",
"metadata": {},
"source": [
"![bedrock_knowledgebase_3](../../../docs/images/bedrock_knowledgebase_3.png)"
"![bedrock_knowledgebase_3](../../docs/images/bedrock_knowledgebase_3.png)"
]
},
{
Expand All @@ -366,7 +368,7 @@
"id": "4a2106fd-e627-4620-8438-9cb4fcf04105",
"metadata": {},
"source": [
"![bedrock_knowledgebase_4](../../../docs/images/bedrock_knowledgebase_4.png)"
"![bedrock_knowledgebase_4](../../docs/images/bedrock_knowledgebase_4.png)"
]
},
{
Expand All @@ -382,7 +384,7 @@
"id": "68c5e7e8-1247-4f09-8376-8ac4d156873e",
"metadata": {},
"source": [
"![bedrock_knowledgebase_5](../../../docs/images/bedrock_knowledgebase_5.png)"
"![bedrock_knowledgebase_5](../../docs/images/bedrock_knowledgebase_5.png)"
]
},
{
Expand All @@ -400,7 +402,7 @@
"tags": []
},
"source": [
"![bedrock_knowledgebase_6](../../../docs/images/bedrock_knowledgebase_6.png)"
"![bedrock_knowledgebase_6](../../docs/images/bedrock_knowledgebase_6.png)"
]
},
{
Expand All @@ -418,7 +420,7 @@
"id": "cda72990-bf03-49c8-8520-44f83ff83652",
"metadata": {},
"source": [
"![bedrock_knowledgebase_7](../../../docs/images/bedrock_knowledgebase_7.png)"
"![bedrock_knowledgebase_7](../../docs/images/bedrock_knowledgebase_7.png)"
]
},
{
Expand All @@ -434,7 +436,7 @@
"id": "2d672fa0-4ecc-48df-afea-1e657e04bc2c",
"metadata": {},
"source": [
"![bedrock_knowledgebase_8](../../../docs/images/bedrock_knowledgebase_8.png)"
"![bedrock_knowledgebase_8](../../docs/images/bedrock_knowledgebase_8.png)"
]
},
{
Expand All @@ -450,7 +452,7 @@
"id": "5e398278-0ce3-4b26-b48e-fea1d947058d",
"metadata": {},
"source": [
"![bedrock_knowledgebase_9](../../../docs/images/bedrock_knowledgebase_9.png)"
"![bedrock_knowledgebase_9](../../docs/images/bedrock_knowledgebase_9.png)"
]
},
{
Expand All @@ -466,7 +468,7 @@
"id": "2c29c470-0870-4ff8-b1c3-3f0a6c812e24",
"metadata": {},
"source": [
"![bedrock_knowledgebase_10](../../../docs/images/bedrock_knowledgebase_10.png)"
"![bedrock_knowledgebase_10](../../docs/images/bedrock_knowledgebase_10.png)"
]
},
{
Expand All @@ -490,7 +492,7 @@
"id": "5e0e8aa3-84db-40a8-9b62-579b3d01a8e5",
"metadata": {},
"source": [
"![bedrock_agents_1](../../../docs/images/bedrock_agents_1.png)"
"![bedrock_agents_1](../../docs/images/bedrock_agents_1.png)"
]
},
{
Expand All @@ -506,7 +508,7 @@
"id": "01633367-7cbe-4205-954c-3e7577fa2fe4",
"metadata": {},
"source": [
"![bedrock_agents_2](../../../docs/images/bedrock_agents_2.png)"
"![bedrock_agents_2](../../docs/images/bedrock_agents_2.png)"
]
},
{
Expand All @@ -522,7 +524,7 @@
"id": "1d1c6314-09ab-437e-b4ea-7d409d136094",
"metadata": {},
"source": [
"![bedrock_agents_3](../../../docs/images/bedrock_agents_3.png)"
"![bedrock_agents_3](../../docs/images/bedrock_agents_3.png)"
]
},
{
Expand All @@ -538,7 +540,7 @@
"id": "af4b2535-cca3-4068-9b80-3fbdd17a5b6b",
"metadata": {},
"source": [
"![bedrock_agents_4](../../../docs/images/bedrock_agents_4.png)"
"![bedrock_agents_4](../../docs/images/bedrock_agents_4.png)"
]
},
{
Expand All @@ -554,7 +556,7 @@
"id": "3a178345-22b5-446c-8e04-ad9e50584b54",
"metadata": {},
"source": [
"![bedrock_agents_5](../../../docs/images/bedrock_agents_5.png)"
"![bedrock_agents_5](../../docs/images/bedrock_agents_5.png)"
]
},
{
Expand All @@ -570,7 +572,7 @@
"id": "4f7840b2-0fcc-4bfe-8f0a-f253b64f9f7d",
"metadata": {},
"source": [
"![bedrock_agents_6](../../../docs/images/bedrock_agents_6.png)"
"![bedrock_agents_6](../../docs/images/bedrock_agents_6.png)"
]
},
{
Expand All @@ -586,7 +588,7 @@
"id": "6a184afa-7f06-4439-bd7e-5a8e7d5c9395",
"metadata": {},
"source": [
"![bedrock_agents_7](../../../docs/images/bedrock_agents_7.png)"
"![bedrock_agents_7](../../docs/images/bedrock_agents_7.png)"
]
},
{
Expand Down
Loading

0 comments on commit b3ea5a3

Please sign in to comment.