Upload Wan-AI_Wan2.2-T2V-A14B-Diffusers_2.py with huggingface_hub
Browse files1234567891011121314151617181920212223242526272829303132333435# /// script# requires-python = ">=3.12"# dependencies = [# "transformers",# "torch",# ]# ///
try: import os from huggingface_hub import InferenceClient client = InferenceClient( provider="auto", api_key=os.environ["HF_TOKEN"], ) video = client.text_to_video( "A young man walking on the street", model="Wan-AI/Wan2.2-T2V-A14B-Diffusers", ) with open('Wan-AI_Wan2.2-T2V-A14B-Diffusers_2.txt', 'w') as f: f.write('Everything was good in Wan-AI_Wan2.2-T2V-A14B-Diffusers_2.txt')except Exception as e: with open('Wan-AI_Wan2.2-T2V-A14B-Diffusers_2.txt', 'w') as f: import traceback traceback.print_exc(file=f)finally: from huggingface_hub import upload_file upload_file( path_or_fileobj='Wan-AI_Wan2.2-T2V-A14B-Diffusers_2.txt', repo_id='model-metadata/custom_code_execution_files', path_in_repo='Wan-AI_Wan2.2-T2V-A14B-Diffusers_2.txt', repo_type='dataset', )Wan-AI_Wan2.2-T2V-A14B-Diffusers_2.pyAdded+35