rajistics commited on
Commit
b5c7a55
1 Parent(s): 6c837dd

Update handler.py

Browse files
Files changed (1) hide show
  1. 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
- self.pipe = pd.read_pickle(r'./churn.pkl')
 
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
  """