Downloads · 30 days
94
64% of all-time downloads
UBC-NLP/afroscope-model
afroscope-model is a machine learning model from UBC-NLP. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Afroscope-model is a language identification (LID) model from the AfroScope project, fine-tuned on Serengeti, supporting 713 African languages.
Downloads · 30 days
94
64% of all-time downloads
All-time downloads
148
Public
Parameters
279M
3.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt2.2 GB · 66%
From the Hugging Face model README
Afroscope-model is a language identification (LID) model from the AfroScope project, fine-tuned on Serengeti, supporting 713 African languages.
For more details on the supported languages and performance, as well as significant changes from previous versions, please refer to LINK_HERE.
Here is how to use this model to detect the language of a given text:
from transformers import pipeline
afroscope_model = pipeline("text-classification", model='UBC-NLP/afroscope-model')
input_text="Ninyepuní íne εtɩε, bε ewǐe Jesi ɔnʋ lεfε kʋkʋkpɔ cε."
result = afroscope_model(input_text)
# Extract the label and score from the first result
language = result[0]['label']
score = result[0]['score']
print(f"detected langauge: {language}\tscore: {round(score*100, 2)}")
@article{kwon2026afroscope,
title={AfroScope: A Framework for Studying the Linguistic Landscape of Africa},
author={Kwon, Sang Yun and Elmadany, AbdelRahim and Abdul-Mageed, Muhammad},
journal={arXiv preprint arXiv:2601.13346},
year={2026}
}