Browse Source

Add from cache message when loading traineddata

pull/443/head
jeromewu 5 years ago
parent
commit
7a398f6420
  1. 1
      src/worker-script/index.js

1
src/worker-script/index.js

@ -84,6 +84,7 @@ const loadLanguage = async ({ @@ -84,6 +84,7 @@ const loadLanguage = async ({
const _data = await readCache(`${cachePath || '.'}/${lang}.traineddata`);
if (typeof _data !== 'undefined') {
log(`[${workerId}]: Load ${lang}.traineddata from cache`);
res.progress({ workerId, status: 'loading language traineddata (from cache)', progress: 0.5 });
data = _data;
} else {
throw Error('Not found in cache');

Loading…
Cancel
Save