ariG23498 HF Staff commited on
Commit
132a344
·
verified ·
1 Parent(s): 9deca6b

Upload zai-org_GLM-4.6V-Flash_0.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. zai-org_GLM-4.6V-Flash_0.txt +28 -0
zai-org_GLM-4.6V-Flash_0.txt ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ # Use a pipeline as a high-level helper
3
+ from transformers import pipeline
4
+
5
+ pipe = pipeline("image-text-to-text", model="zai-org/GLM-4.6V-Flash")
6
+ messages = [
7
+ {
8
+ "role": "user",
9
+ "content": [
10
+ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
11
+ {"type": "text", "text": "What animal is on the candy?"}
12
+ ]
13
+ },
14
+ ]
15
+ pipe(text=messages)
16
+ ```
17
+
18
+ ERROR:
19
+ Traceback (most recent call last):
20
+ File "/tmp/zai-org_GLM-4.6V-Flash_0BWXwBb.py", line 26, in <module>
21
+ pipe = pipeline("image-text-to-text", model="zai-org/GLM-4.6V-Flash")
22
+ File "/tmp/.cache/uv/environments-v2/ce3ded9120c008ab/lib/python3.13/site-packages/transformers/pipelines/__init__.py", line 1197, in pipeline
23
+ raise e
24
+ File "/tmp/.cache/uv/environments-v2/ce3ded9120c008ab/lib/python3.13/site-packages/transformers/pipelines/__init__.py", line 1190, in pipeline
25
+ raise TypeError(
26
+ ...<3 lines>...
27
+ )
28
+ TypeError: Processor was loaded, but it is not an instance of `ProcessorMixin`. Got type `<class 'transformers.tokenization_utils_fast.PreTrainedTokenizerFast'>` instead. Please check that you specified correct pipeline task for the model and model has processor implemented and saved.