Instructions to use Ammar-alhaj-ali/arabic-MARBERT-dialect-identification-city with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ammar-alhaj-ali/arabic-MARBERT-dialect-identification-city with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Ammar-alhaj-ali/arabic-MARBERT-dialect-identification-city")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Ammar-alhaj-ali/arabic-MARBERT-dialect-identification-city") model = AutoModelForSequenceClassification.from_pretrained("Ammar-alhaj-ali/arabic-MARBERT-dialect-identification-city", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Arabic-MARBERT-dialect-Identification-City Model
Model description
arabic-MARBERT-dialect-identification-city Model is a dialect identification model that was built by fine-tuning the MARBERT model. For the fine-tuning, I used MADAR Corpus 26 dataset, which includes 26 labels(cities).
How to use
To use the model with a transformers pipeline:
>>>from transformers import pipeline
>>>model = pipeline('text-classification', model='Ammar-alhaj-ali/arabic-MARBERT-dialect-identification-city')
>>>sentences = ['ناطرين البرنامج', 'اكلنا هوا بهل شروة']
>>>model(sentences)
[{'label': 'Beirut', 'score': 0.9731963276863098},
{'label': 'Aleppo', 'score': 0.4592577815055847}]
- Downloads last month
- 249