Open Devloper-Sigmoid opened 4 months ago
hey, I found a fix for this.
line 145 in app.py needs changing from:
**inputs, forced_bos_token_id=tokenizer.lang_code_to_id[tgt_lang],
To:
**inputs, forced_bos_token_id=tokenizer.convert_tokens_to_ids(tgt_lang),
hey, I found a fix for this.
line 145 in app.py needs changing from:
**inputs, forced_bos_token_id=tokenizer.lang_code_to_id[tgt_lang],
To:
**inputs, forced_bos_token_id=tokenizer.convert_tokens_to_ids(tgt_lang),
thanks a lot man!
fixed here by downgrading transformers, see https://github.com/huggingface/transformers/issues/31348#issuecomment-2383895798
hey, I found a fix for this.
line 145 in app.py needs changing from:
**inputs, forced_bos_token_id=tokenizer.lang_code_to_id[tgt_lang],
To:
**inputs, forced_bos_token_id=tokenizer.convert_tokens_to_ids(tgt_lang),
Thanks it worked, you fixed it
NllbTokenizerFast' object has no attribute 'lang_code_to_id