Instructions to use haresh2792005/MFAF-Net with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MediaPipe
How to use haresh2792005/MFAF-Net with MediaPipe:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download setup_dirs.py from haresh2792005/MFAF-Net: direct link, hf CLI and curl.
- Browser
- Download file 1 kB
-
https://huggingface.co/haresh2792005/MFAF-Net/resolve/main/setup_dirs.py
- Command line
-
hf download hf://haresh2792005/MFAF-Net/setup_dirs.py
-
curl -L -o setup_dirs.py https://huggingface.co/haresh2792005/MFAF-Net/resolve/main/setup_dirs.py
1 kB
| """ | |
| setup_dirs.py — MFAF-Net Directory Setup Script | |
| Run once before starting the application to ensure all required | |
| directories exist. | |
| Usage: | |
| python setup_dirs.py | |
| """ | |
| import os | |
| ROOT = os.path.dirname(os.path.abspath(__file__)) | |
| REQUIRED_DIRS = [ | |
| os.path.join(ROOT, 'static', 'results'), | |
| os.path.join(ROOT, 'static', 'uploads'), | |
| os.path.join(ROOT, 'static', 'css'), | |
| os.path.join(ROOT, 'static', 'js'), | |
| os.path.join(ROOT, 'templates'), | |
| os.path.join(ROOT, 'mfaf_net'), | |
| # Dataset directory — extract Complete_PlasticSurgery_Datasets.zip here | |
| os.path.join(ROOT, 'data'), | |
| ] | |
| def setup(): | |
| print("MFAF-Net — Directory Setup") | |
| print("=" * 40) | |
| for d in REQUIRED_DIRS: | |
| if os.path.isdir(d): | |
| print(f" [exists] {d}") | |
| else: | |
| os.makedirs(d, exist_ok=True) | |
| print(f" [created] {d}") | |
| print("=" * 40) | |
| print("Setup complete. All required directories are ready.") | |
| if __name__ == '__main__': | |
| setup() | |