mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-25 15:15:23 +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;
|
loadingModel.value = true;
|
||||||
|
|
||||||
try {
|
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) {
|
catch (e: any) {
|
||||||
error.value = `Model loading failed: ${e.toString()}`;
|
error.value = `Model loading failed: ${e.toString()}`;
|
||||||
|
|||||||
Reference in new issue
Block a user