ariG23498 HF Staff commited on
Commit
8c19e95
·
verified ·
1 Parent(s): 51c758a

Upload black-forest-labs_FLUX.1-schnell_0.py with huggingface_hub

Browse files
black-forest-labs_FLUX.1-schnell_0.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # /// script
2
+ # requires-python = ">=3.12"
3
+ # dependencies = [
4
+ # "numpy",
5
+ # "einops",
6
+ # "torch",
7
+ # "transformers",
8
+ # "datasets",
9
+ # "accelerate",
10
+ # "timm",
11
+ # ]
12
+ # ///
13
+
14
+ try:
15
+ from huggingface_hub import login
16
+ login(new_session=False)
17
+ with open('black-forest-labs_FLUX.1-schnell_0.txt', 'w') as f:
18
+ f.write('Everything was good in black-forest-labs_FLUX.1-schnell_0.txt')
19
+ except Exception as e:
20
+ with open('black-forest-labs_FLUX.1-schnell_0.txt', 'w') as f:
21
+ import traceback
22
+ traceback.print_exc(file=f)
23
+ finally:
24
+ from huggingface_hub import upload_file
25
+ upload_file(
26
+ path_or_fileobj='black-forest-labs_FLUX.1-schnell_0.txt',
27
+ repo_id='model-metadata/custom_code_execution_files',
28
+ path_in_repo='black-forest-labs_FLUX.1-schnell_0.txt',
29
+ repo_type='dataset',
30
+ )