Skip to content

Commit 67029d6

Browse files
committed
update paligemma 2
1 parent 202c0d6 commit 67029d6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

site/en/gemma/docs/paligemma/inference-with-keras.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
"Before using PaliGemma for the first time, you must request access to the model through Kaggle by completing the following steps:\n",
120120
"\n",
121121
"1. Log in to [Kaggle](https://www.kaggle.com), or create a new Kaggle account if you don't already have one.\n",
122-
"1. Go to the [PaliGemma model card](https://www.kaggle.com/models/google/paligemma/) and click **Request Access**.\n",
122+
"1. Go to the [PaliGemma model card](https://www.kaggle.com/models/google/paligemma-2/) and click **Request Access**.\n",
123123
"1. Complete the consent form and accept the terms and conditions."
124124
]
125125
},
@@ -200,7 +200,7 @@
200200
},
201201
"outputs": [],
202202
"source": [
203-
"!pip install -U -q keras-nlp"
203+
"!pip install -U -q keras-nlp kagglehub"
204204
]
205205
},
206206
{
@@ -260,7 +260,7 @@
260260
},
261261
"outputs": [],
262262
"source": [
263-
"paligemma = keras_hub.models.PaliGemmaCausalLM.from_preset(\"pali_gemma_3b_mix_224\")\n",
263+
"paligemma = keras_hub.models.PaliGemmaCausalLM.from_preset(\"kaggle://keras/paligemma2/keras/pali_gemma_2_mix_3b_224\")\n",
264264
"paligemma.summary()"
265265
]
266266
},
@@ -302,7 +302,7 @@
302302
" image = PIL.Image.open(contents)\n",
303303
" image = crop_and_resize(image, target_size)\n",
304304
" image = np.array(image)\n",
305-
" # Remove alpha channel if neccessary.\n",
305+
" # Remove alpha channel if necessary.\n",
306306
" if image.shape[2] == 4:\n",
307307
" image = image[:, :, :3]\n",
308308
" return image\n",
@@ -492,7 +492,7 @@
492492
"source": [
493493
"### Use `segment` prompt\n",
494494
"\n",
495-
"The following example code uses the `segment` prompt syntax to locate the area of an image occupied by an object. It uses the Google `big_vision` library to interpret the model output and generate a mask for the segemented object.\n",
495+
"The following example code uses the `segment` prompt syntax to locate the area of an image occupied by an object. It uses the Google `big_vision` library to interpret the model output and generate a mask for the segmented object.\n",
496496
"\n",
497497
"Before getting started, install the `big_vision` library and its dependencies, as shown in this code example:\n"
498498
]
@@ -672,8 +672,8 @@
672672
"metadata": {
673673
"accelerator": "GPU",
674674
"colab": {
675-
"name": "inference-with-keras.ipynb",
676-
"toc_visible": true
675+
"toc_visible": true,
676+
"provenance": []
677677
},
678678
"kernelspec": {
679679
"display_name": "Python 3",
@@ -682,4 +682,4 @@
682682
},
683683
"nbformat": 4,
684684
"nbformat_minor": 0
685-
}
685+
}

0 commit comments

Comments
 (0)