Download imageExtract.py from arssite/ADAP_System__Alzheimer_Detection_Assessment__Prediction_System: direct link, hf CLI and curl.
- Browser
- Download file 252 Bytes
-
https://huggingface.co/spaces/arssite/ADAP_System__Alzheimer_Detection_Assessment__Prediction_System/resolve/main/imageExtract.py
- Command line
-
hf download hf://spaces/arssite/ADAP_System__Alzheimer_Detection_Assessment__Prediction_System/imageExtract.py
-
curl -L -o imageExtract.py https://huggingface.co/spaces/arssite/ADAP_System__Alzheimer_Detection_Assessment__Prediction_System/resolve/main/imageExtract.py
252 Bytes
| import shutil | |
| import os | |
| for d in os.listdir('./Image'): | |
| if d[0] != '.': | |
| for f in os.listdir('./Image/' + d): | |
| if f[-3:] == 'nii': | |
| shutil.move("./Image/" + d + '/' + f, './Image1/' + d) | |
| shutil.rmtree('./Image') | |