Views
No views yet
import fasttext
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(repo_id="paruwka/LiteLID", filename="wordlid_v3.ftz", cache_dir=None)
model = fasttext.load_model(model_path)
model.predict(['predicting', 'language'], k=3) # this will return a tuple: (list of lists of top-k language labels, list of lists of their respective probabilities)