Spaces:
Running on Zero
Running on Zero
Download baselines_2124/bindNode24/src/config.py from projectxddi/be_protein_binding: direct link, hf CLI and curl.
- Browser
- Download file 942 Bytes
-
https://huggingface.co/spaces/projectxddi/be_protein_binding/resolve/main/baselines_2124/bindNode24/src/config.py
- Command line
-
hf download hf://spaces/projectxddi/be_protein_binding/baselines_2124/bindNode24/src/config.py
-
curl -L -o config.py https://huggingface.co/spaces/projectxddi/be_protein_binding/resolve/main/baselines_2124/bindNode24/src/config.py
942 Bytes
| import configparser | |
| import argparse | |
| import os | |
| class App: | |
| file_path = None | |
| _conf = None | |
| def config(): | |
| if App.file_path is None: | |
| print('Checking for alternative file path to .ini file') | |
| parser = argparse.ArgumentParser( | |
| description='Run bindNode24 for binding residue prediction') | |
| parser.add_argument('-f', | |
| default="src/config.ini", | |
| type=str, | |
| help='File path to .ini file if it isn\'t config.ini', | |
| metavar="file_path") | |
| args = parser.parse_args() | |
| App.file_path = os.path.normpath(args.f) | |
| print(f'Used config filepath is: {App.file_path}') | |
| if App._conf is None: | |
| App._conf = configparser.ConfigParser() | |
| App._conf.read(App.file_path) | |
| return App._conf |