Skip to content

Commit

Permalink
Change sagemaker example to make more sense (jupyterlab#231)
Browse files Browse the repository at this point in the history
* Change sagemaker example to make more sense

* Makes example more neutral

* Update sagemaker.ipynb

Update the example for flan-xl.

---------

Co-authored-by: Piyush Jain <piyushjain@duck.com>
  • Loading branch information
JasonWeill and 3coins authored Jun 21, 2023
1 parent 998f202 commit c3107a5
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions examples/sagemaker.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "9f2b0270-1c33-4918-b534-4ec104f90141",
"metadata": {},
Expand All @@ -49,24 +48,24 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"id": "31f3e6e3-48cf-4e60-96d3-8b8e1dd34bec",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"AI generated code inserted below &#11015;&#65039;"
"text/markdown": [
"What is the weather like in the US today?"
],
"text/plain": [
"<IPython.core.display.HTML object>"
"<IPython.core.display.Markdown object>"
]
},
"execution_count": 4,
"execution_count": 2,
"metadata": {
"text/html": {
"text/markdown": {
"jupyter_ai": {
"model_id": "jumpstart-dft-hf-text2text-flan-t5-xl",
"provider_id": "sagemaker-endpoint"
Expand All @@ -77,18 +76,8 @@
}
],
"source": [
"%%ai sagemaker-endpoint:jumpstart-dft-hf-text2text-flan-t5-xl --region-name=us-east-1 --request-schema={\"text_inputs\":\"<prompt>\"} --response-path=generated_texts.[0] -f code\n",
"Write some Python code"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "42408ea8-7264-44bc-ac0c-6b5dd03134d6",
"metadata": {},
"outputs": [],
"source": [
"a = [] b = [] c = [] d = ["
"%%ai sagemaker-endpoint:jumpstart-dft-hf-text2text-flan-t5-xl --region-name=us-east-1 --request-schema={\"text_inputs\":\"<prompt>\"} --response-path=generated_texts.[0]\n",
"Generate a question about weather today."
]
},
{
Expand Down

0 comments on commit c3107a5

Please sign in to comment.