mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
chore(Translator): fix typescript stange error
This commit is contained in:
1 parent
6a8d1d30f3
commit
6b1825f568
1 file changed
+2
-1
@@ -90,7 +90,8 @@ async function translateText() {
|
||||
loadingModel.value = true;
|
||||
|
||||
try {
|
||||
translators.set(modelId, await pipeline('translation', modelId));
|
||||
// @ts-expect-error Probably a Typescript bug 'too complex type'
|
||||
translators.set(modelId, await pipeline('translation', modelId) as TranslationPipeline);
|
||||
}
|
||||
catch (e: any) {
|
||||
error.value = `Model loading failed: ${e.toString()}`;
|
||||
|
||||
Reference in new issue
Block a user