Update README.md (#35)

- Update README.md (617c1010a31f4c093f15af88aae3c433c9741700)

Co-authored-by: Patrick Loeber <patloeber@users.noreply.huggingface.co>
This commit is contained in:
ai-modelscope
2025-03-22 06:04:43 +08:00
parent f59372281f
commit 1df438a01a

View File

@ -60,10 +60,10 @@ for everyone.
### Usage
Below there are some code snippets on how to get quickly started with running the model. First, install the Transformers library with the version made for Gemma 3:
Below there are some code snippets on how to get quickly started with running the model. First, install the Transformers library. Gemma 3 is supported starting from transformers 4.50.0.
```sh
$ pip install git+https://github.com/huggingface/transformers@v4.49.0-Gemma-3
$ pip install -U transformers
```
Then, copy the snippet from the section that is relevant for your use case.
@ -102,7 +102,7 @@ messages = [
]
output = pipe(text=messages, max_new_tokens=200)
print(output[0][0]["generated_text"][-1]["content"])
print(output[0]["generated_text"][-1]["content"])
# Okay, let's take a look!
# Based on the image, the animal on the candy is a **turtle**.
# You can see the shell shape and the head and legs.