ariG23498 HF Staff commited on
Commit
c9e8f36
·
verified ·
1 Parent(s): 7973780

Upload google_gemma-3n-E4B-it_1.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. google_gemma-3n-E4B-it_1.py +26 -0
google_gemma-3n-E4B-it_1.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
+ # Login into Hugging Face Hub
11
+ from huggingface_hub import notebook_login
12
+ notebook_login()
13
+ with open('google_gemma-3n-E4B-it_1.txt', 'w') as f:
14
+ f.write('Everything was good in google_gemma-3n-E4B-it_1.txt')
15
+ except Exception as e:
16
+ with open('google_gemma-3n-E4B-it_1.txt', 'w') as f:
17
+ import traceback
18
+ traceback.print_exc(file=f)
19
+ finally:
20
+ from huggingface_hub import upload_file
21
+ upload_file(
22
+ path_or_fileobj='google_gemma-3n-E4B-it_1.txt',
23
+ repo_id='model-metadata/custom_code_execution_files',
24
+ path_in_repo='google_gemma-3n-E4B-it_1.txt',
25
+ repo_type='dataset',
26
+ )