ariG23498 HF Staff commited on
Commit
4cc05df
·
verified ·
1 Parent(s): e573e51

Upload internlm_JanusCoder-14B_0.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. internlm_JanusCoder-14B_0.txt +28 -0
internlm_JanusCoder-14B_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="internlm/JanusCoder-14B")
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/internlm_JanusCoder-14B_0LN9mk0.py", line 19, in <module>
21
+ pipe = pipeline("image-text-to-text", model="internlm/JanusCoder-14B")
22
+ File "/tmp/.cache/uv/environments-v2/eb3259cb7eb95fbe/lib/python3.13/site-packages/transformers/pipelines/__init__.py", line 1197, in pipeline
23
+ raise e
24
+ File "/tmp/.cache/uv/environments-v2/eb3259cb7eb95fbe/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.models.qwen2.tokenization_qwen2_fast.Qwen2TokenizerFast'>` instead. Please check that you specified correct pipeline task for the model and model has processor implemented and saved.