Update README.md
Browse files48 unmodified lines4950515253545556575859606162636465666768697048 unmodified linesYou must install the Nvidia cuda toolkit first, if you want to do GPU inference.Next, install the `quickmt` python library and download the model:```bashgit clone https://github.com/quickmt/quickmt.gitpip install ./quickmt/quickmt-model-download quickmt/quickmt-en-de ./quickmt-en-de```Finally use the model in python:```pythonfrom quickmt import Translator# Auto-detects GPU, set to "cpu" to force CPU inferencet = Translator("./quickmt-en-de/", device="auto")# Translate - set beam size to 5 for higher quality (but slower speed)sample_text = 'Dr. Ehud Ur, professor of medicine at Dalhousie University in Halifax, Nova Scotia and chair of the clinical and scientific division of the Canadian Diabetes Association cautioned that the research is still in its early days.'48 unmodified lines4950515253545556575859606162636465666768697071727348 unmodified linesYou must install the Nvidia cuda toolkit first, if you want to do GPU inference.Next, install the `quickmt` [python library](github.com/quickmt/quickmt).```bashgit clone https://github.com/quickmt/quickmt.gitpip install ./quickmt/```Finally, use the model in python:```pythonfrom quickmt import Translatorfrom huggingface_hub import snapshot_download# Download Model (if not downloaded already) and return path to local model# Device is either 'auto', 'cpu' or 'cuda't = Translator(snapshot_download("quickmt/quickmt-en-de", ignore_patterns="eole-model/*"),device="cpu")# Translate - set beam size to 5 for higher quality (but slower speed)sample_text = 'Dr. Ehud Ur, professor of medicine at Dalhousie University in Halifax, Nova Scotia and chair of the clinical and scientific division of the Canadian Diabetes Association cautioned that the research is still in its early days.'
README.md+10-7