Skip to content

Commit

Permalink
use diffrent svm model
Browse files Browse the repository at this point in the history
  • Loading branch information
ipranjal committed Dec 2, 2023
1 parent d22f21e commit 6aa726c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

def load_model(model_name):
dirname = os.path.dirname(__file__)
filename_svm = os.path.join(dirname, '../models/svmgamma:0.001_C:1.joblib')
filename_svm = os.path.join(dirname, '../models/svmgamma:0.001_C:2.joblib')
svm = load(filename_svm)
filename_tree = os.path.join(dirname, '../models/treemax_depth:100.joblib')
tree = load(filename_tree)
Expand Down
4 changes: 2 additions & 2 deletions test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def get_processed_data():

def test_predict_svm():
X,y = get_processed_data()
response = app.test_client().post("/predict/svm", json={"image":X[3].tolist()})
response = app.test_client().post("/predict/svm", json={"image":X[9].tolist()})
assert response.status_code == 200
assert response.get_json()['prediction'] == [3]
assert response.get_json()['prediction'] == [9]

def test_predict_tree():
X,y = get_processed_data()
Expand Down

0 comments on commit 6aa726c

Please sign in to comment.