from crawler import Crawler from preprocess_purchase import PreprocessPurchase from inference import Inference from learning_purchase import Learning from postprocess import Postprocess, Email from datetime import datetime data_version = datetime.now().strftime("%Y%m%d") load_date = data_version target = 'purchase' mode = 'inference' encoder_version = 'original' model_version = 'original' #crawling crawler = Crawler(data_version, target) #preprocess prep = PreprocessPurchase(mode, data_version, encoder_version) #inference inf = Inference(data_version, model_version) #postprocess post = Postprocess(data_version, model_version) body = post.urls() em = Email() msg = em.create_message(body) em.send(msg)
spec = prep.pre_price(spec) spec = prep.pre_bid(spec) spec = prep.pre_transportation(spec) spec = prep.pre_land(spec) spec = prep.pre_area(spec) spec = prep.pre_structure(spec) spec = prep.pre_age(spec) spec = prep.pre_floor(spec) spec = prep.pre_direction(spec) spec = prep.pre_mcost(spec) spec = prep.pre_rcost(spec) spec = prep.encode_cat_to_label(spec) prep.save_spec(spec) #inference inf = Inference(data_version, model_version) spec = inf.load_prep_spec() treasure = inf.inference(spec) inf.save_treasure(treasure) #postprocess post = Postprocess(data_version, model_version) spec = post.load_result() spec = post.decode(spec) body = post.urls(spec) em = Email() msg = em.create_message(body) em.send(msg) else: print('input "learning" or "inference"')