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

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

Browse files
Files changed (1) hide show
  1. google_gemma-3n-E4B-it_0.py +34 -0
google_gemma-3n-E4B-it_0.py ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # /// script
2
+ # requires-python = ">=3.12"
3
+ # dependencies = [
4
+ # "transformers",
5
+ # "torch",
6
+ # ]
7
+ # ///
8
+
9
+ try:
10
+ #@title Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # https://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ with open('google_gemma-3n-E4B-it_0.txt', 'w') as f:
22
+ f.write('Everything was good in google_gemma-3n-E4B-it_0.txt')
23
+ except Exception as e:
24
+ with open('google_gemma-3n-E4B-it_0.txt', 'w') as f:
25
+ import traceback
26
+ traceback.print_exc(file=f)
27
+ finally:
28
+ from huggingface_hub import upload_file
29
+ upload_file(
30
+ path_or_fileobj='google_gemma-3n-E4B-it_0.txt',
31
+ repo_id='model-metadata/custom_code_execution_files',
32
+ path_in_repo='google_gemma-3n-E4B-it_0.txt',
33
+ repo_type='dataset',
34
+ )