TareHimself / manga-translator

A manga translator built with python
GNU General Public License v3.0
77 stars 13 forks source link

HuggingFace models #36

Closed Vxerr closed 7 months ago

Vxerr commented 8 months ago

Hi, how exactly do I use other HF models? I tried google/madlad400-3b-mt but it returned some warnings (Your input_length: 22 is bigger than 0.9 * max_length: 20. You might consider increasing your max_length manually, e.g. translator('...', max_length=400) C:\Users\X\anaconda3\envs\manga-translator\lib\site-packages\transformers\generation\utils.py:1355: UserWarning: Using the model-agnostic default max_length (=20) to control the generation length. We recommend setting max_new_tokens to control the maximum length of the generation.) and, I assume because the model is multilingual and there is no way to specify languages, it produced french text

TareHimself commented 8 months ago

the hugging face plugin was made for simple translation models like https://huggingface.co/Helsinki-NLP/opus-mt-ja-en so to make that model work you would have to create a custom plugin for it