Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@ jobs:

- name: Generate synthetic dataset
run: |
python generate_synthetic_dataset.py
python train_color_model.py
python data/generate_synthetic_dataset.py
python app/model/train_color_model.py

- name: Run tests
run: |
pytest tests/

- name: Check test coverage
run: |
pip install coverage
coverage run -m pytest tests/
coverage report
pytest tests/
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,5 @@ Thumbs.db
ehthumbs.db
Desktop.ini

# Images and data
tests/images/

# Logs
*.log
4 changes: 2 additions & 2 deletions app/model/train_color_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os

# Load dataset
df = pd.read_csv('../../data/dataset.csv')
df = pd.read_csv('./data/dataset.csv')
X = df[['H', 'S', 'V']].values
y = df['label'].values

Expand All @@ -18,7 +18,7 @@
model.fit(X_train, y_train)

# Save model
os.makedirs('', exist_ok=True)
os.makedirs('./', exist_ok=True)
joblib.dump(model, 'color_model.pkl')

print("✅ Model trained and saved to app/model/color_model.pkl")
Loading