Update README.md
Browse files
README.md
CHANGED
|
@@ -1,15 +1,13 @@
|
|
| 1 |
## Description
|
| 2 |
|
| 3 |
-
Afroscope is a
|
| 4 |
|
| 5 |
-
**Latest:** MODEL_NAME is now updated to VERSION. VERSION supports N_LABELS labels (LABEL_FORMAT_HERE).
|
| 6 |
|
| 7 |
For more details on the supported languages and performance, as well as significant changes from previous versions, please refer to LINK_HERE.
|
| 8 |
|
| 9 |
-
- **
|
| 10 |
-
- **Repository:** github
|
| 11 |
-
- **Paper:**
|
| 12 |
-
- **Point of Contact:** EMAIL@DOMAIN.COM
|
| 13 |
|
| 14 |
---
|
| 15 |
|
|
@@ -18,14 +16,21 @@ For more details on the supported languages and performance, as well as signific
|
|
| 18 |
Here is how to use this model to detect the language of a given text:
|
| 19 |
|
| 20 |
```python
|
| 21 |
-
import
|
| 22 |
-
from huggingface_hub import hf_hub_download
|
| 23 |
|
| 24 |
-
# model.bin is the latest version always
|
| 25 |
-
model_path = hf_hub_download(repo_id="ORG_OR_USER/MODEL_NAME", filename="model.bin")
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
```
|
| 30 |
|
| 31 |
## Citation
|
|
|
|
| 1 |
## Description
|
| 2 |
|
| 3 |
+
Afroscope is a language identification (LID) model fine-tuned on [Serengeti](https://huggingface.co/UBC-NLP/serengeti) that supports 713 African Languages.
|
| 4 |
|
|
|
|
| 5 |
|
| 6 |
For more details on the supported languages and performance, as well as significant changes from previous versions, please refer to LINK_HERE.
|
| 7 |
|
| 8 |
+
- **Dataset:** [dataset](https://huggingface.co/datasets/14kwonss/afroscope-data)
|
| 9 |
+
- **Repository:** [github](https://github.com/skwon01-UBC/AfroScope?tab=readme-ov-file)
|
| 10 |
+
- **Paper:** [Arxiv]([VENUE YEAR](https://www.arxiv.org/pdf/2601.13346))
|
|
|
|
| 11 |
|
| 12 |
---
|
| 13 |
|
|
|
|
| 16 |
Here is how to use this model to detect the language of a given text:
|
| 17 |
|
| 18 |
```python
|
| 19 |
+
from transformers import pipeline
|
|
|
|
| 20 |
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
afroscope_model = pipeline("text-classification", model='14kwonss/afroscope-model')
|
| 23 |
+
|
| 24 |
+
input_text="Ninyepuní íne εtɩε, bε ewǐe Jesi ɔnʋ lεfε kʋkʋkpɔ cε."
|
| 25 |
+
|
| 26 |
+
result = afroscope_model(input_text)
|
| 27 |
+
|
| 28 |
+
# Extract the label and score from the first result
|
| 29 |
+
language = result[0]['label']
|
| 30 |
+
score = result[0]['score']
|
| 31 |
+
|
| 32 |
+
print(f"detected langauge: {language}\tscore: {round(score*100, 2)}")
|
| 33 |
+
|
| 34 |
```
|
| 35 |
|
| 36 |
## Citation
|