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
| { | |
| "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" | |
| } | |
| } |