Update README.md
Browse files
README.md
CHANGED
|
@@ -38,10 +38,17 @@ Following languages supported by the model:
|
|
| 38 |
- french (fr)
|
| 39 |
|
| 40 |
# Use a pipeline as a high-level helper
|
| 41 |
-
from transformers import pipeline
|
| 42 |
|
| 43 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
pipe = pipeline("text-classification", model="ImranzamanML/GEFS-language-detector")
|
|
|
|
|
|
|
| 45 |
```
|
| 46 |
|
| 47 |
# Load model directly
|
|
@@ -51,6 +58,7 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
|
| 51 |
|
| 52 |
tokenizer = AutoTokenizer.from_pretrained("ImranzamanML/GEFS-language-detector")
|
| 53 |
model = AutoModelForSequenceClassification.from_pretrained("ImranzamanML/GEFS-language-detector")
|
|
|
|
| 54 |
```
|
| 55 |
|
| 56 |
## Model Training
|
|
@@ -76,3 +84,14 @@ model = AutoModelForSequenceClassification.from_pretrained("ImranzamanML/GEFS-la
|
|
| 76 |
fr 0.9995 0.9996 0.9996 0.9996
|
| 77 |
es 0.9994 0.9996 0.9995 0.9996
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
- french (fr)
|
| 39 |
|
| 40 |
# Use a pipeline as a high-level helper
|
|
|
|
| 41 |
|
| 42 |
```python
|
| 43 |
+
from transformers import pipeline
|
| 44 |
+
|
| 45 |
+
text=["Mir gefällt die Art und Weise, Sprachen zu erkennen",
|
| 46 |
+
"I like the way to detect languages",
|
| 47 |
+
"Me gusta la forma de detectar idiomas",
|
| 48 |
+
"J'aime la façon de détecter les langues"]
|
| 49 |
pipe = pipeline("text-classification", model="ImranzamanML/GEFS-language-detector")
|
| 50 |
+
lang_detect=pipe(text, top_k=1)
|
| 51 |
+
print("The detected language is", lang_detect)
|
| 52 |
```
|
| 53 |
|
| 54 |
# Load model directly
|
|
|
|
| 58 |
|
| 59 |
tokenizer = AutoTokenizer.from_pretrained("ImranzamanML/GEFS-language-detector")
|
| 60 |
model = AutoModelForSequenceClassification.from_pretrained("ImranzamanML/GEFS-language-detector")
|
| 61 |
+
|
| 62 |
```
|
| 63 |
|
| 64 |
## Model Training
|
|
|
|
| 84 |
fr 0.9995 0.9996 0.9996 0.9996
|
| 85 |
es 0.9994 0.9996 0.9995 0.9996
|
| 86 |
|
| 87 |
+
## About Author
|
| 88 |
+
|
| 89 |
+
- **Name**: Muhammad Imran Zaman
|
| 90 |
+
- **Company**: [Theum AG](https://theum.com/en/index.htm?t=)
|
| 91 |
+
- **Professional Links**:
|
| 92 |
+
- Kaggle: [Profile](https://www.kaggle.com/muhammadimran112233)
|
| 93 |
+
- LinkedIn: [Profile](linkedin.com/in/muhammad-imran-zaman)
|
| 94 |
+
- Google Scholar: [Profile](https://scholar.google.com/citations?user=ulVFpy8AAAAJ&hl=en)
|
| 95 |
+
- YouTube: [Channel](https://www.youtube.com/@consolioo)
|
| 96 |
+
- GitHub: [Channel](https://github.com/Imran-ml)
|
| 97 |
+
-
|