def load_model(): items = get_bucket_items() newest_item = max(map(int,items)) model_weights = get_from_s3(str(newest_item)) with open('./current.weights', 'w') as f: f.write(model_weights) model.load_weights("./current.weights")
def load_model(): items = get_bucket_items('kerasmodels') newest_item = max(map(int,items)) model_weights = get_from_s3(str(newest_item), 'kerasmodels') print("loading model") with open('./current.weights', 'w') as f: f.write(model_weights) model.load_weights("./current.weights")