Qingsong Lv
commited on
Commit
•
e60e6a1
1
Parent(s):
983f3fe
Update README.md
Browse files
README.md
CHANGED
@@ -33,8 +33,8 @@ pip install SwissArmyTransformer>=0.3.6 torch>1.10.0 torchvision transformers>=4
|
|
33 |
|
34 |
```ipython
|
35 |
>>> from transformers import AutoTokenizer, AutoModel
|
36 |
-
>>> tokenizer = AutoTokenizer.from_pretrained("THUDM/
|
37 |
-
>>> model = AutoModel.from_pretrained("THUDM/
|
38 |
>>> image_path = "your image path"
|
39 |
>>> response, history = model.chat(tokenizer, image_path, "描述这张图片。", history=[])
|
40 |
>>> print(response)
|
|
|
33 |
|
34 |
```ipython
|
35 |
>>> from transformers import AutoTokenizer, AutoModel
|
36 |
+
>>> tokenizer = AutoTokenizer.from_pretrained("THUDM/visualglm-6b", trust_remote_code=True)
|
37 |
+
>>> model = AutoModel.from_pretrained("THUDM/visualglm-6b", trust_remote_code=True).half().cuda()
|
38 |
>>> image_path = "your image path"
|
39 |
>>> response, history = model.chat(tokenizer, image_path, "描述这张图片。", history=[])
|
40 |
>>> print(response)
|