Skip to content

Commit

Permalink
Fix newline characters for pali_gemma (keras-team#1655)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdangerw authored May 29, 2024
1 parent 619a951 commit 38c6608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keras_nlp/src/models/pali_gemma/pali_gemma_causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ 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"]
}
)
# Generate with batched prompts.
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"]
}
)
```
Expand Down

0 comments on commit 38c6608

Please sign in to comment.