santosh3110/Ecoclassify-Wildlife_Classifier
0
1import os2from pathlib import Path3import logging4 5logging.basicConfig(level=logging.INFO, format='[%(asctime)s]: %(message)s:')6 7project_name = "ecoclassify"8 9list_of_files = [10 ".github/workflows/main.yaml",11 f"src/{project_name}/__init__.py",12 f"src/{project_name}/components/__init__.py",13 f"src/{project_name}/components/data_ingestion.py",14 f"src/{project_name}/components/prepare_base_model.py",15 f"src/{project_name}/components/prepare_callbacks.py",16 f"src/{project_name}/components/training.py",17 f"src/{project_name}/components/evaluation.py",18 f"src/{project_name}/pipeline/__init__.py",19 f"src/{project_name}/pipeline/training_pipeline.py",20 f"src/{project_name}/pipeline/prediction_pipeline.py",21 f"src/{project_name}/config/__init__.py",22 f"src/{project_name}/config/configuration.py",23 f"src/{project_name}/constants/__init__.py",24 f"src/{project_name}/constants/paths.py",25 f"src/{project_name}/entity/__init__.py",26 f"src/{project_name}/entity/config_entity.py",27 f"src/{project_name}/utils/__init__.py",28 f"src/{project_name}/utils/logger.py",29 f"src/{project_name}/utils/common.py",30 f"src/{project_name}/app.py",31 "config/config.yaml",32 "params.yaml",33 "dvc.yaml",34 "requirements.txt",35 "setup.py",36 "research/trials.ipynb",37 "templates/index.html"38]39 40for filepath in list_of_files:41 filepath = Path(filepath)42 filedir, filename = os.path.split(filepath)43 44 if filedir != "":45 os.makedirs(filedir, exist_ok=True)46 logging.info(f"๐ Created directory: {filedir}")47 48 if not filepath.exists():49 with open(filepath, "w") as f:50 pass51 logging.info(f"๐ Created empty file: {filepath}")52 else:53 logging.info(f"โ
File already exists: {filepath}")54 