Open Hemanth12-git opened 2 months ago
Hey someone in the issues has shared a solution to this problem. It's not the optimal solution but it's working for me:
import { pipeline, env } from '@xenova/transformers';
env.allowLocalModels = false;
env.useBrowserCache = false;
Hey someone in the issues has shared a solution to this problem. It's not the optimal solution but it's working for me:
import { pipeline, env } from '@xenova/transformers'; env.allowLocalModels = false; env.useBrowserCache = false;
I use your method, it work, but it generate a new problem, as you say in the new issue: Translation's LOADING is not stop
Yeah the translation part is loading forever. Anyways it was a nice project 😄
Whenever i try to run the translation part, the following error comes up on the console
Error loading pipeline: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON at JSON.parse (<anonymous>) at getModelJSON (http://localhost:5173/node_modules/.vite/deps/@xenova_transformers.js?v=ce3fabd1:14328:15) at async Promise.all (index 0) at async loadTokenizer (http://localhost:5173/node_modules/.vite/deps/@xenova_transformers.js?v=ce3fabd1:17831:16) at async AutoTokenizer.from_pretrained (http://localhost:5173/node_modules/.vite/deps/@xenova_transformers.js?v=ce3fabd1:21018:46) at async Promise.all (index 0) at async loadItems (http://localhost:5173/node_modules/.vite/deps/@xenova_transformers.js?v=ce3fabd1:29508:3) at async pipeline (http://localhost:5173/node_modules/.vite/deps/@xenova_transformers.js?v=ce3fabd1:29469:19) at async MyTranslationPipeline.getInstance (http://localhost:5173/src/utils/translate.worker.js?worker_file&type=module:12:33) at async http://localhost:5173/src/utils/translate.worker.js?worker_file&type=module:24:26
Its basically saying that following error is due to error loading pipeline and it is not a valid JSON.
I tried running it in public and private websites and its the same result.
Looked up for documentation on the xenova transformers but couldnt come up with a solution.
Please look up to this asap and publish a solution for this