Spaces:
Sleeping
Sleeping
Download MLStructFP/utils/_path.py from rawanessam/MLSTRUCT-FP: direct link, hf CLI and curl.
- Browser
- Download file 309 Bytes
-
https://huggingface.co/spaces/rawanessam/MLSTRUCT-FP/resolve/main/MLStructFP/utils/_path.py
- Command line
-
hf download hf://spaces/rawanessam/MLSTRUCT-FP/MLStructFP/utils/_path.py
-
curl -L -o _path.py https://huggingface.co/spaces/rawanessam/MLSTRUCT-FP/resolve/main/MLStructFP/utils/_path.py
309 Bytes
| """ | |
| MLSTRUCT-FP - UTILS - PATH | |
| Path utils. | |
| """ | |
| __all__ = ['make_dirs'] | |
| import os | |
| def make_dirs(f: str) -> str: | |
| """ | |
| Create dir if not exists. | |
| :param f: Filename | |
| :returns: File | |
| """ | |
| if f != '': | |
| fdir = os.path.dirname(f) | |
| os.makedirs(fdir, exist_ok=True) | |
| return f | |