ariG23498 HF Staff commited on
Commit
60c766b
·
verified ·
1 Parent(s): 7e98039

Upload google_embeddinggemma-300m_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. google_embeddinggemma-300m_0.py +25 -9
google_embeddinggemma-300m_0.py CHANGED
@@ -25,17 +25,33 @@ try:
25
  with open('google_embeddinggemma-300m_0.txt', 'w', encoding='utf-8') as f:
26
  f.write('Everything was good in google_embeddinggemma-300m_0.txt')
27
  except Exception as e:
28
- with open('google_embeddinggemma-300m_0.txt', 'w', encoding='utf-8') as f:
 
 
 
 
 
 
 
 
29
  import traceback
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  traceback.print_exc(file=f)
31
-
32
- import os
33
- from slack_sdk import WebClient
34
- client = WebClient(token=os.environ['SLACK_TOKEN'])
35
- client.chat_postMessage(
36
- channel='#exp-slack-alerts',
37
- text='Problem in <https://huggingface.co/datasets/model-metadata/code_execution_files/blob/main/google_embeddinggemma-300m_0.txt|google_embeddinggemma-300m_0.txt>',
38
- )
39
  finally:
40
  from huggingface_hub import upload_file
41
  upload_file(
 
25
  with open('google_embeddinggemma-300m_0.txt', 'w', encoding='utf-8') as f:
26
  f.write('Everything was good in google_embeddinggemma-300m_0.txt')
27
  except Exception as e:
28
+ import os
29
+ from slack_sdk import WebClient
30
+ client = WebClient(token=os.environ['SLACK_TOKEN'])
31
+ client.chat_postMessage(
32
+ channel='#exp-slack-alerts',
33
+ text='Problem in <https://huggingface.co/datasets/model-metadata/code_execution_files/blob/main/google_embeddinggemma-300m_0.txt|google_embeddinggemma-300m_0.txt>',
34
+ )
35
+
36
+ with open('google_embeddinggemma-300m_0.txt', 'a', encoding='utf-8') as f:
37
  import traceback
38
+ f.write('```CODE:
39
+ #@title Licensed under the Apache License, Version 2.0 (the "License");
40
+ # you may not use this file except in compliance with the License.
41
+ # You may obtain a copy of the License at
42
+ #
43
+ # https://www.apache.org/licenses/LICENSE-2.0
44
+ #
45
+ # Unless required by applicable law or agreed to in writing, software
46
+ # distributed under the License is distributed on an "AS IS" BASIS,
47
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
48
+ # See the License for the specific language governing permissions and
49
+ # limitations under the License.
50
+ ```
51
+ ERROR:
52
+ ')
53
  traceback.print_exc(file=f)
54
+
 
 
 
 
 
 
 
55
  finally:
56
  from huggingface_hub import upload_file
57
  upload_file(