Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
@@ -2,13 +2,15 @@ import pandas as pd
|
|
2 |
import pickle
|
3 |
from typing import Dict, List, Any
|
4 |
import numpy as np
|
|
|
5 |
|
6 |
|
7 |
# set device
|
8 |
class EndpointHandler():
|
9 |
def __init__(self, path=""):
|
10 |
# load the optimized model
|
11 |
-
|
|
|
12 |
|
13 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
14 |
"""
|
|
|
2 |
import pickle
|
3 |
from typing import Dict, List, Any
|
4 |
import numpy as np
|
5 |
+
import os
|
6 |
|
7 |
|
8 |
# set device
|
9 |
class EndpointHandler():
|
10 |
def __init__(self, path=""):
|
11 |
# load the optimized model
|
12 |
+
pathb = os.path.join(path,"./churn.pkl")
|
13 |
+
self.pipe = pd.read_pickle(pathb)
|
14 |
|
15 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
16 |
"""
|