diff --git a/app/__init_for_pythonanywhere__.py b/app/__init_for_pythonanywhere__.py index 7b01729..a79979a 100644 --- a/app/__init_for_pythonanywhere__.py +++ b/app/__init_for_pythonanywhere__.py @@ -160,6 +160,7 @@ def setup_logger(name, log_file, level=logging.INFO): # Jinja global variables ######################## +dir_path = DEFAULT_PATH app.config['OWN_BRAND'] = True if getenv('OWN_BRAND', "false").lower() == 'true' else False logo_path = getenv('LOGO_PATH', '') if logo_path != '' and path.isfile(join(logo_path, "logo.png")): diff --git a/app/search/score_pages.py b/app/search/score_pages.py index 177cf30..97a4a43 100644 --- a/app/search/score_pages.py +++ b/app/search/score_pages.py @@ -75,7 +75,7 @@ def mk_vec_matrix(lang): for i in range(1,len(npzs)): npz = load_npz(npzs[i]).toarray() username = npzs[i].split('.u.')[1].replace('.npz','') - m = vstack((m, npz)) + m = vstack((csr_matrix(m), csr_matrix(npz))) c+=npz.shape[0] bins.append(c) idxs = joblib.load(join(pod_dir, username, lang, npzs[i].replace('.npz','')+'.npz.idx'))[1]