ariG23498 HF Staff commited on
Commit
c7d67e9
·
verified ·
1 Parent(s): 100810b

Upload allenai_olmOCR-2-7B-1025_1.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. allenai_olmOCR-2-7B-1025_1.py +9 -0
allenai_olmOCR-2-7B-1025_1.py CHANGED
@@ -6,6 +6,7 @@
6
  # "transformers",
7
  # "accelerate",
8
  # "peft",
 
9
  # ]
10
  # ///
11
 
@@ -21,6 +22,14 @@ except Exception as e:
21
  with open('allenai_olmOCR-2-7B-1025_1.txt', 'w', encoding='utf-8') as f:
22
  import traceback
23
  traceback.print_exc(file=f)
 
 
 
 
 
 
 
 
24
  finally:
25
  from huggingface_hub import upload_file
26
  upload_file(
 
6
  # "transformers",
7
  # "accelerate",
8
  # "peft",
9
+ # "slack-sdk",
10
  # ]
11
  # ///
12
 
 
22
  with open('allenai_olmOCR-2-7B-1025_1.txt', 'w', encoding='utf-8') as f:
23
  import traceback
24
  traceback.print_exc(file=f)
25
+
26
+ from slack_sdk import WebClient
27
+ client = WebClient(token=os.environ["SLACK_TOKEN"])
28
+ client.chat_postMessage(
29
+ channel=#exp-slack-alerts,
30
+ text='Problem in <https://huggingface.co/datasets/model-metadata/code_execution_files/blob/main/allenai_olmOCR-2-7B-1025_1.txt|allenai_olmOCR-2-7B-1025_1.txt>',
31
+ thread_ts=parent_message_ts,
32
+ )
33
  finally:
34
  from huggingface_hub import upload_file
35
  upload_file(