Skip to content

Commit 243156d

Browse files
committed
Update instructions
1 parent 6e030f9 commit 243156d

File tree

2 files changed

+77
-3
lines changed

2 files changed

+77
-3
lines changed

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MIT License
2+
3+
*Copyright (c) 2025 [Pierre-Henry Soria](https://ph7.me)*
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,71 @@
55
- Model trained on breast cancer dataset
66
- REST API with FastAPI - real-time requests
77
- Docker support
8+
- Environment variable configuration
9+
- Citable research-ready API
10+
- MIT Licensed
11+
12+
## 📂 Project Structure
13+
14+
```plaintext
15+
.
16+
├── app/ # FastAPI application
17+
├── train/ # Training scripts
18+
├── assets/images/ # Images, diagrams
19+
├── requirements.txt # Python dependencies
20+
├── Dockerfile
21+
├── .env.dist # Sample environment variables
22+
├── LICENSE.md
23+
└── README.md
24+
```
825

926
## 🔋 Run Locally
1027

28+
1. Clone the repository:
29+
```bash
30+
git clone https://github.com/your-username/Python_GML_MLPipeline.git
31+
cd Python_GML_MLPipeline
32+
```
33+
34+
2. Create and activate a virtual environment:
35+
```bash
36+
python -m venv venv
37+
source venv/bin/activate
38+
```
39+
40+
3. Install dependencies:
41+
```bash
42+
pip install -r requirements.txt
43+
```
44+
45+
4. Copy `.env.dist` to `.env` and configure your environment variables:
46+
```env
47+
PORT=8000
48+
MODEL_PATH=train/model.pkl
49+
```
50+
51+
5. Train the model:
1152
```bash
1253
cd train/
1354
python train_model.py
14-
1555
cd ..
16-
uvicorn app.main:app --reload
56+
```
57+
58+
6. Start the server:
59+
```bash
60+
uvicorn app.main:app --reload --port $PORT
1761
```
1862

1963
## 🐟 Docker
2064

65+
1. Build the Docker image:
2166
```bash
2267
docker build -t ml-api .
23-
docker run -p 8000:8000 ml-api
68+
```
69+
70+
2. Run the container:
71+
```bash
72+
docker run --env-file .env -p 8000:8000 ml-api
2473
```
2574

2675
Visit `http://127.0.0.1:8000/docs` for Swagger UI.
@@ -33,3 +82,7 @@ Visit `http://127.0.0.1:8000/docs` for Swagger UI.
3382
Made with ❤️ by **[Pierre-Henry Soria](https://pierrehenry.be)**. A super passionate & enthusiastic Problem-Solver / Senior Software Engineer. Also a true cheese 🧀, ristretto ☕️, and dark chocolate lover! 😋
3483

3584
[![@phenrysay](https://img.shields.io/badge/x-000000?style=for-the-badge&logo=x)](https://x.com/phenrysay "Follow Me on X") [![pH-7](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/pH-7 "My GitHub") [![YouTube Video](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://youtu.be/cWBuZ4DXGK4 "YouTube SucceedAI Video") [![BlueSky](https://img.shields.io/badge/BlueSky-00A8E8?style=for-the-badge&logo=bluesky&logoColor=white)](https://bsky.app/profile/ph7s.bsky.social "Follow Me on BlueSky")
85+
86+
## 📄 License
87+
88+
Distributed under the [MIT License](LICENSE.md) 🎉 Happy hacking! 🤠

0 commit comments

Comments
 (0)