ariG23498 HF Staff commited on
Commit
4a67dcc
·
verified ·
1 Parent(s): 5372efd

Upload Skywork-R1V3-38B_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. Skywork-R1V3-38B_0.py +26 -0
Skywork-R1V3-38B_0.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # /// script
2
+ # requires-python = ">=3.12"
3
+ # dependencies = [
4
+ # "transformers",
5
+ # "torch",
6
+ # ]
7
+ # ///
8
+
9
+ 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
+ except Exception as e:
15
+ exception_file = 'Skywork_Skywork-R1V3-38B_0_exception.txt'
16
+ with open(exception_file, 'w') as f:
17
+ import traceback
18
+ traceback.print_exc(file=f)
19
+ # Upload exception log to HuggingFace
20
+ from huggingface_hub import upload_file
21
+ upload_file(
22
+ path_or_fileobj=exception_file,
23
+ repo_id='model-metadata/model-code-exception',
24
+ path_in_repo='09-07-25/Skywork_Skywork-R1V3-38B_0_exception.txt',
25
+ repo_type='dataset',
26
+ )