File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ import os
2+
3+ BASE_DIR = "."
4+ TEMPLATE = """# {project_name}
5+
6+ ## 📌 Project Overview
7+ This project is part of the **Machine Learning Projects Collection (100+ projects with source code)**.
8+
9+ ## 🛠️ Potential Technologies / Tools
10+ - Python
11+ - Pandas
12+ - Scikit-learn
13+ - TensorFlow/Keras (if deep learning)
14+
15+ ## 🚀 How to Run
16+ 1. Clone this repository
17+ 2. Navigate to this project folder
18+ 3. Install dependencies (`pip install -r requirements.txt`)
19+ 4. Run the code
20+
21+ ---
22+ ✅ Auto-generated by [ML Projects Bot] 🤖
23+ """
24+
25+ def format_name (folder ):
26+ return folder .replace ("-" , " " ).replace ("_" , " " ).title ()
27+
28+ for folder in os .listdir (BASE_DIR ):
29+ if os .path .isdir (folder ) and folder not in [".github" , ".git" ]:
30+ readme_path = os .path .join (folder , "README.md" )
31+ if not os .path .exists (readme_path ):
32+ project_name = format_name (folder )
33+ with open (readme_path , "w" ) as f :
34+ f .write (TEMPLATE .format (project_name = project_name ))
35+ print (f"Generated README for { project_name } " )
You can’t perform that action at this time.
0 commit comments