Views
No views yet
1from huggingface_hub import hf_hub_download
2import fasttext
3
4filename = hf_hub_download(
5 repo_id="mesolitica/fasttext-language-detection-ms-id",
6 filename="fasttext.ftz"
7)
8lang_model = fasttext.load_model(filename)
9lang_model.predict('hello name saye', k = 10)1(('__label__standard-malay',
2 '__label__other',
3 '__label__socialmedia-indonesian',
4 '__label__local-malay'),
5 array([8.16933990e-01, 1.58563450e-01, 2.42817383e-02, 2.62394664e-04]))