Update README.md
Browse files50 unmodified lines515253545455565758596059606361626364676869656667686970717273747550 unmodified lines
You must install the Nvidia cuda toolkit first, if you want to do GPU inference.
Next, install the `quickmt` python library and download the model:Next, install the `quickmt` [python library](github.com/quickmt/quickmt).
```bashgit clone https://github.com/quickmt/quickmt.gitpip install ./quickmt/
quickmt-model-download quickmt/quickmt-en-it ./quickmt-en-it```
Finally use the model in python:Finally, use the model in python:
```pythonfrom quickmt import Translator
# Auto-detects GPU, set to "cpu" to force CPU inferencet = Translator("./quickmt-en-it/", device="auto")from 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-it", 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