model-metadata/custom-code-py-files
0455
1# /// script2# requires-python = ">=3.12"3# dependencies = [4# "transformers",5# "torch",6# ]7# ///8 9try:10 # Use a pipeline as a high-level helper11 from transformers import pipeline12 13 pipe = pipeline("visual-question-answering", model="Skywork/Skywork-R1V3-38B", trust_remote_code=True)14except Exception as e:15 exception_file = 'Skywork_Skywork-R1V3-38B_0_exception.txt'16 with open(exception_file, 'w') as f:17 import traceback18 traceback.print_exc(file=f)19 # Upload exception log to HuggingFace20 from huggingface_hub import upload_file21 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 )