Skip to content

Commit

Permalink
Merge pull request #30 from kookmin-sw/feat/flask_setting
Browse files Browse the repository at this point in the history
Feat/flask setting
  • Loading branch information
lkl4502 authored Apr 12, 2024
2 parents f3c2fd7 + eaf1fd3 commit 3583459
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions PC_model/pc_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
import sys
import os
import joblib

sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from image_processing.gamma_correction import gamma_correction
Expand Down Expand Up @@ -46,6 +47,9 @@ def train(self, train_x, train_y):
def test(self, test_x):
return self.xgb.predict(test_x), self.ovr.predict(test_x), self.ovo.predict(test_x), self.knn.predict(test_x), self.lr.predict(test_x), self.voting.predict(test_x), self.rfc.predict(test_x)

def save(self):
joblib.dump(value=self, filename=os.path.join(os.path.dirname(os.path.dirname(__file__)), "test_model.pkl"))


#%%
train_df = pd.read_csv("/Users/ohs/Desktop/capstone/personal_color_dataset/train/new_data.csv")
Expand Down
4 changes: 1 addition & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

train_path = "./train"
test_path = "./test"
import joblib

Binary file added test_model.pkl
Binary file not shown.

0 comments on commit 3583459

Please sign in to comment.