Update handler.py
Browse files- handler.py +3 -3
handler.py
CHANGED
|
@@ -3,9 +3,10 @@ import pickle
|
|
| 3 |
import numpy as np
|
| 4 |
import pandas as pd
|
| 5 |
import os
|
|
|
|
| 6 |
class EndpointHandler:
|
| 7 |
def __init__(self, path=""):
|
| 8 |
-
model_path = os.path.join(path, "
|
| 9 |
with open(model_path, 'rb') as f:
|
| 10 |
self.model = pickle.load(f)
|
| 11 |
|
|
@@ -31,5 +32,4 @@ class EndpointHandler:
|
|
| 31 |
|
| 32 |
def load_model(model_path):
|
| 33 |
handler = EndpointHandler(model_path)
|
| 34 |
-
return handler
|
| 35 |
-
|
|
|
|
| 3 |
import numpy as np
|
| 4 |
import pandas as pd
|
| 5 |
import os
|
| 6 |
+
|
| 7 |
class EndpointHandler:
|
| 8 |
def __init__(self, path=""):
|
| 9 |
+
model_path = os.path.join(path, "model.pkl")
|
| 10 |
with open(model_path, 'rb') as f:
|
| 11 |
self.model = pickle.load(f)
|
| 12 |
|
|
|
|
| 32 |
|
| 33 |
def load_model(model_path):
|
| 34 |
handler = EndpointHandler(model_path)
|
| 35 |
+
return handler
|
|
|