File size: 658 Bytes
5c2bcd8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import json
import pickle


__locations=None
__data_columns = None
__model =None

def get_location_names():
    pass

def load_saved_artifacts():
    print("loading saved artifacts...start")
    global __data_columns
    global __locations

    with open("./artifacts/columns.json",'r') as f:
        __data_columns=json.load(f)['data_columns']
        __locations = __data_columns[3:]
    
    with open("./artifacts/banglore_home_prices_model.pickle",'rb') as f:
        __model == pickle.load(f)
        print("loading saved artifacts ..done")

if __name__ =='__main__':
    load_saved_artifacts()
    print(get_location_names())