Open Devloper-Sigmoid opened 1 month 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!
NllbTokenizerFast' object has no attribute 'lang_code_to_id