From 619a951adc4e5301b1f30bbe7211c3edda7887b7 Mon Sep 17 00:00:00 2001 From: Matt Watson <1389937+mattdangerw@users.noreply.github.com> Date: Thu, 23 May 2024 17:05:15 -0700 Subject: [PATCH] PaliGemma docstring fix (#1651) Missing quote leads to a rendering error on keras.io --- keras_nlp/src/models/pali_gemma/pali_gemma_causal_lm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keras_nlp/src/models/pali_gemma/pali_gemma_causal_lm.py b/keras_nlp/src/models/pali_gemma/pali_gemma_causal_lm.py index 9f3ce37572..b1a62d7eb7 100644 --- a/keras_nlp/src/models/pali_gemma/pali_gemma_causal_lm.py +++ b/keras_nlp/src/models/pali_gemma/pali_gemma_causal_lm.py @@ -55,7 +55,8 @@ class PaliGemmaCausalLM(CausalLM): ```python image = np.random.rand(224, 224, 3) pali_gemma_lm = keras_nlp.models.PaliGemmaCausalLM.from_preset( - "pali_gemma_pt_224") + "pali_gemma_3b_mix_224" + ) pali_gemma_lm.generate( { "images": image, @@ -67,7 +68,7 @@ class PaliGemmaCausalLM(CausalLM): pali_gemma_lm.generate( { "images": [image, image], - "text": ["answer en where is the cow standing?\n", "caption en\n] + "text": ["answer en where is the cow standing?\n", "caption en\n"] } ) ``` @@ -84,7 +85,7 @@ class PaliGemmaCausalLM(CausalLM): } pali_gemma_lm = keras_nlp.models.PaliGemmaCausalLM.from_preset( - "pali_gemma_pt_224", + "pali_gemma_3b_mix_224", preprocessor=None, ) pali_gemma_lm.generate(inputs)