From 38c6608034bce59dee593e86b437ae5878e601cf Mon Sep 17 00:00:00 2001 From: Matt Watson <1389937+mattdangerw@users.noreply.github.com> Date: Wed, 29 May 2024 13:17:29 -0700 Subject: [PATCH] Fix newline characters for pali_gemma (#1655) --- keras_nlp/src/models/pali_gemma/pali_gemma_causal_lm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 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 b1a62d7eb7..6d2cbdf7c7 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 @@ -60,7 +60,7 @@ class PaliGemmaCausalLM(CausalLM): pali_gemma_lm.generate( { "images": image, - "text": ["answer en where is the cow standing?\n"] + "text": ["answer en where is the cow standing?\\n"] } ) @@ -68,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"] } ) ```