Install

One pip command. The model downloads itself the first time you use it.

With pip

Terminal
pip install neam

Neam needs Python 3.10 or newer. It installs PyTorch, Transformers, the Hugging Face Hub client, khmer-nltk for word splitting, and the libraries used to read web articles.

GPU? Neam runs well on a CPU. If you want a GPU, install the PyTorch build for your machine from pytorch.org first, then install Neam.

With the web app

Terminal
pip install "neam[app]"

This adds Gradio for the web app. The app itself lives in the repository, so run it from a clone.

The model download

The first time you load Neam, it downloads the model from the Hugging Face Hub (MoriartyPuth/neam, about 265 MB) and caches it. Later runs load from the cache and work offline. You can also point Neam at a local folder; see loading options.

From source

Terminal
git clone https://github.com/MoriartyPuth/neam.git
cd neam
pip install -e ".[app]"
python -m unittest discover -s tests