CoolFace
Datasetpublic

model-metadata/code_python_files

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes13kdownloads
OpenFold_OpenFold3_0.py48 linesDownload Raw Back to root
1# /// script2# requires-python = ">=3.12"3# dependencies = [4#     "torch",5#     "torchvision",6#     "transformers",7#     "diffusers",8#     "sentence-transformers",9#     "accelerate",10#     "peft",11#     "slack-sdk",12# ]13# ///14 15try:16    from huggingface_hub import login17    login(new_session=False)18    with open('OpenFold_OpenFold3_0.txt', 'w', encoding='utf-8') as f:19        f.write('Everything was good in OpenFold_OpenFold3_0.txt')20except Exception as e:21    import os22    from slack_sdk import WebClient23    client = WebClient(token=os.environ['SLACK_TOKEN'])24    client.chat_postMessage(25        channel='#exp-slack-alerts',26        text='Problem in <https://huggingface.co/datasets/model-metadata/code_execution_files/blob/main/OpenFold_OpenFold3_0.txt|OpenFold_OpenFold3_0.txt>',27    )28 29    with open('OpenFold_OpenFold3_0.txt', 'a', encoding='utf-8') as f:30        import traceback31        f.write('''```CODE: 32from huggingface_hub import login33login(new_session=False)34```35 36ERROR: 37''')38        traceback.print_exc(file=f)39    40finally:41    from huggingface_hub import upload_file42    upload_file(43        path_or_fileobj='OpenFold_OpenFold3_0.txt',44        repo_id='model-metadata/code_execution_files',45        path_in_repo='OpenFold_OpenFold3_0.txt',46        repo_type='dataset',47    )48