(fname, model)
return nb
wget -nc http://www.aueb.gr/users/ion/data/enron-spam/preprocessed/enron1.tar.gz
wget -nc http://www.aueb.gr/users/ion/data/enron-spam/preprocessed/enron1.tar.gz
wget - nc http : // www . aueb . gr / users / ion / data / enron - spam / preprocessed / enron1 . tar . gz
def build_model(fname, model):
    '''
    wget -nc http://www.aueb.gr/users/ion/data/enron-spam/preprocessed/enron1.tar.gz
    '''

    # Generate features.
    X, y = parse_file(fname)

    # Fits the model.
    nb = fit_model(X, y)

    logger.info(f"fitted model to: {fname}")

    # Save the model.
    if model:
        logger.info(f"saving model to: {model}")
        dump(nb, model)

    return nb
def build_model ( fname , model ) : # Generate features. X , y = parse_file ( fname ) # Fits the model. nb = fit_model ( X , y ) logger . info ( f"fitted model to: {fname}" ) # Save the model. if model : logger . info ( f"saving model to: {model}" ) dump ( nb , model ) return nb