CoolFace
Datasetpublic

model-metadata/code_python_files

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes13kdownloads
rednote-hilab_dots.ocr_0.py56 linesDownload Raw Back to root
1# /// script2# requires-python = ">=3.12"3# dependencies = [4#     "torch",5#     "torchvision",6#     "transformers",7#     "accelerate",8#     "peft",9#     "slack-sdk",10# ]11# ///12 13try:14    # integration status unknown.15      16    # Please clone model and use locally.17    18    # Also feel free to open a Pull request 19    # for integration of the huggingface model hub20    # into the corresponding library =)21    with open('rednote-hilab_dots.ocr_0.txt', 'w', encoding='utf-8') as f:22        f.write('Everything was good in rednote-hilab_dots.ocr_0.txt')23except Exception as e:24    import os25    from slack_sdk import WebClient26    client = WebClient(token=os.environ['SLACK_TOKEN'])27    client.chat_postMessage(28        channel='#exp-slack-alerts',29        text='Problem in <https://huggingface.co/datasets/model-metadata/code_execution_files/blob/main/rednote-hilab_dots.ocr_0.txt|rednote-hilab_dots.ocr_0.txt>',30    )31 32    with open('rednote-hilab_dots.ocr_0.txt', 'a', encoding='utf-8') as f:33        import traceback34        f.write('''```CODE: 35# integration status unknown.36  37# Please clone model and use locally.38 39# Also feel free to open a Pull request 40# for integration of the huggingface model hub41# into the corresponding library =)42```43 44ERROR: 45''')46        traceback.print_exc(file=f)47    48finally:49    from huggingface_hub import upload_file50    upload_file(51        path_or_fileobj='rednote-hilab_dots.ocr_0.txt',52        repo_id='model-metadata/code_execution_files',53        path_in_repo='rednote-hilab_dots.ocr_0.txt',54        repo_type='dataset',55    )56