Example #1
0
def load_config(model_name):
    print('loading csv file ...')
    global config

    config_file_path = Config.getPath('models') + '/' + model_name + '-config.joblib'

    config = ClassifierFactory.getConfig(joblib_file=config_file_path)

    #Two classes - Fake=0, Reliable=1
    config.set('num_target_tokens',2)
Example #2
0
def load_config(**kwargs):
    print('loading csv file ...')
    global config

    df = pd.read_csv(Config.getPath('data') + '/' + TRAINING_DATA)
    df = df.sample(50000)
    X = df['question_text']
    Y = df['target']

    print('preparing configuration...')

    config = ClassifierFactory.getConfig(X, Y, json_file=None, **kwargs)

    #Two classes - Fake=0, Reliable=1
    config.set('num_target_tokens', 2)