ariG23498 HF Staff commited on
Commit
a5972c0
·
verified ·
1 Parent(s): 432ee37

Upload Skywork-R1V3-38B_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. Skywork-R1V3-38B_0.py +11 -1
Skywork-R1V3-38B_0.py CHANGED
@@ -10,7 +10,17 @@ try:
10
  # Use a pipeline as a high-level helper
11
  from transformers import pipeline
12
 
13
- pipe = pipeline("visual-question-answering", model="Skywork/Skywork-R1V3-38B", trust_remote_code=True)
 
 
 
 
 
 
 
 
 
 
14
  with open('Skywork-R1V3-38B_0.txt', 'w') as f:
15
  f.write('Everything was good in Skywork-R1V3-38B_0')
16
  except Exception as e:
 
10
  # Use a pipeline as a high-level helper
11
  from transformers import pipeline
12
 
13
+ pipe = pipeline("image-text-to-text", model="Skywork/Skywork-R1V3-38B", trust_remote_code=True)
14
+ messages = [
15
+ {
16
+ "role": "user",
17
+ "content": [
18
+ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
19
+ {"type": "text", "text": "What animal is on the candy?"}
20
+ ]
21
+ },
22
+ ]
23
+ pipe(text=messages)
24
  with open('Skywork-R1V3-38B_0.txt', 'w') as f:
25
  f.write('Everything was good in Skywork-R1V3-38B_0')
26
  except Exception as e: