import os # Define the project structure without the root folder project_structure = { "data": ["dataset.csv"], "models": ["deepseek_model"], "scripts": ["parse.py", "guidance.py", "response_generator.py", "generate_code.py"], "api": ["api.py"], "configs": ["config.yaml"], "files": ["requirements.txt", "roadmap.txt", "rules.txt", "app.py", "Dockerfile"] } # Function to create directories and files def create_project_structure(base_path, structure): for folder, contents in structure.items(): folder_path = os.path.join(base_path, folder) os.makedirs(folder_path, exist_ok=True) print(f"Created directory: {folder_path}") for item in contents: if isinstance(item, dict): # Handle nested directories create_project_structure(folder_path, item) else: if "." in item: # It's a file file_path = os.path.join(folder_path, item) with open(file_path, "w") as f: pass # Create an empty file print(f"Created file: {file_path}") else: # It's a subdirectory subdir_path = os.path.join(folder_path, item) os.makedirs(subdir_path, exist_ok=True) print(f"Created directory: {subdir_path}") # Main execution if __name__ == "__main__": base_path = os.getcwd() # Use the current working directory print(f"Creating project structure in: {base_path}") create_project_structure(base_path, project_structure) print("Project structure created successfully!")