Skip to content

Commit

Permalink
PaliGemma model Code Correction: Model Name & Documentation Link (#544)
Browse files Browse the repository at this point in the history
* PaliGemma Code Correction: Model Name & Documentation Link

Typo: Fixed the model name in the code - `paligemma = keras_hub.models.PaliGemmaCausalLM.from_preset("paligemma_3b_mix_224")` from "paligemma_3b_mix_224" to "pali_gemma_3b_mix_224" to correctly laod the model.
Broken Link: Updated the URL for "PaliGemma prompt and system instructions" by replacing the existing URL with the  https://ai.google.dev/gemma/docs/paligemma/prompt-system-instructions/##prompt_task_syntax.

* Update inference-with-keras.ipynb

Fixed problem with "View on" button from lint report

---------

Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
  • Loading branch information
RenuPatelGoogle and joefernandez authored Dec 12, 2024
1 parent e94e728 commit e8dc8c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/en/gemma/docs/paligemma/inference-with-keras.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"\n",
"<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
"<td>\n",
"<a target=\"_blank\" href=\"https://ai.google.dev/gemma/docs/paligemma/fine-tuning-paligemma\"><img src=\"https://ai.google.dev/static/site-assets/images/docs/notebook-site-button.png\" height=\"32\" width=\"32\" />View on ai.google.dev</a>\n",
"<a target=\"_blank\" href=\"https://ai.google.dev/gemma/docs/paligemma/inference-with-keras\"><img src=\"https://ai.google.dev/static/site-assets/images/docs/notebook-site-button.png\" height=\"32\" width=\"32\" />View on ai.google.dev</a>\n",
"</td>\n",
"<td>\n",
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/google/generative-ai-docs/blob/main/site/en/gemma/docs/paligemma/inference-with-keras.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n",
Expand Down Expand Up @@ -260,7 +260,7 @@
},
"outputs": [],
"source": [
"paligemma = keras_hub.models.PaliGemmaCausalLM.from_preset(\"paligemma_3b_mix_224\")\n",
"paligemma = keras_hub.models.PaliGemmaCausalLM.from_preset(\"pali_gemma_3b_mix_224\")\n",
"paligemma.summary()"
]
},
Expand Down Expand Up @@ -393,7 +393,7 @@
"source": [
"## Generate output\n",
"\n",
"After loading the model and creating utility methods, you can prompt the model with image and text data to generate a responses. PaliGemma models are trained with specific prompt syntax for specific tasks, such as `answer`, `caption`, and `detect`. For more information about PaliGemma prompt task syntax, see [PaliGemma prompt and system instructions](https://ai.google.com/gemma/docs/paligemma/prompt-system-instructions##prompt_task_syntax).\n",
"After loading the model and creating utility methods, you can prompt the model with image and text data to generate a responses. PaliGemma models are trained with specific prompt syntax for specific tasks, such as `answer`, `caption`, and `detect`. For more information about PaliGemma prompt task syntax, see [PaliGemma prompt and system instructions](https://ai.google.dev/gemma/docs/paligemma/prompt-system-instructions##prompt_task_syntax).\n",
"\n",
"Prepare an image for use in a generation prompt by using the following code to load a test image into an object:"
]
Expand Down

0 comments on commit e8dc8c5

Please sign in to comment.