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)}")
Citation
@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}
}
Runs of UBC-NLP afroscope-model on huggingface.co
7
Total runs
1
24-hour runs
1
3-day runs
1
7-day runs
6
30-day runs
More Information About afroscope-model huggingface.co Model
afroscope-model huggingface.co
afroscope-model huggingface.co is an AI model on huggingface.co that provides afroscope-model's model effect (), which can be used instantly with this UBC-NLP afroscope-model model. huggingface.co supports a free trial of the afroscope-model model, and also provides paid use of the afroscope-model. Support call afroscope-model model through api, including Node.js, Python, http.
afroscope-model huggingface.co is an online trial and call api platform, which integrates afroscope-model's modeling effects, including api services, and provides a free online trial of afroscope-model, you can try afroscope-model online for free by clicking the link below.
UBC-NLP afroscope-model online free url in huggingface.co:
afroscope-model is an open source model from GitHub that offers a free installation service, and any user can find afroscope-model on GitHub to install. At the same time, huggingface.co provides the effect of afroscope-model install, users can directly use afroscope-model installed effect in huggingface.co for debugging and trial. It also supports api for free installation.