Instructions to use ArabicNewsAnalyzer/MARBERTv2-Single-Arabic-Dialect-MSA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ArabicNewsAnalyzer/MARBERTv2-Single-Arabic-Dialect-MSA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ArabicNewsAnalyzer/MARBERTv2-Single-Arabic-Dialect-MSA")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("ArabicNewsAnalyzer/MARBERTv2-Single-Arabic-Dialect-MSA") model = AutoModelForSequenceClassification.from_pretrained("ArabicNewsAnalyzer/MARBERTv2-Single-Arabic-Dialect-MSA", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 740 Bytes
dd3249c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | {
"label2id": {
"Algeria": 0,
"Bahrain": 1,
"Egypt": 2,
"Iraq": 3,
"Jordan": 4,
"Kuwait": 5,
"Lebanon": 6,
"Libya": 7,
"MSA": 8,
"Morocco": 9,
"Oman": 10,
"Palestine": 11,
"Qatar": 12,
"Saudi_Arabia": 13,
"Sudan": 14,
"Syria": 15,
"Tunisia": 16,
"UAE": 17,
"Yemen": 18
},
"id2label": {
"0": "Algeria",
"1": "Bahrain",
"2": "Egypt",
"3": "Iraq",
"4": "Jordan",
"5": "Kuwait",
"6": "Lebanon",
"7": "Libya",
"8": "MSA",
"9": "Morocco",
"10": "Oman",
"11": "Palestine",
"12": "Qatar",
"13": "Saudi_Arabia",
"14": "Sudan",
"15": "Syria",
"16": "Tunisia",
"17": "UAE",
"18": "Yemen"
}
} |