Instructions to use NAMAA-Space/AraModernBert-Topic-Classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NAMAA-Space/AraModernBert-Topic-Classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="NAMAA-Space/AraModernBert-Topic-Classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("NAMAA-Space/AraModernBert-Topic-Classifier") model = AutoModelForSequenceClassification.from_pretrained("NAMAA-Space/AraModernBert-Topic-Classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
update readme.md
Browse files
README.md
CHANGED
|
@@ -55,11 +55,22 @@ sample = '''
|
|
| 55 |
PUT SOME TEXT HERE TO CLASSIFY ITS TOPIC
|
| 56 |
'''
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
classifier(sample)
|
| 59 |
|
| 60 |
# [{'label': 'health', 'score': 0.6779336333274841}]
|
| 61 |
-
```
|
| 62 |
|
|
|
|
| 63 |
## Citation
|
| 64 |
|
| 65 |
```
|
|
|
|
| 55 |
PUT SOME TEXT HERE TO CLASSIFY ITS TOPIC
|
| 56 |
'''
|
| 57 |
|
| 58 |
+
## Test Phase Results:
|
| 59 |
+
|
| 60 |
+
- The model was evalauted on Test Set of 14181 examples of different topics, the distrubtion of these topics are:
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
|
| 64 |
+
- The model achieved the follwoing accuracy for prediction on this test set:
|
| 65 |
+
|
| 66 |
+

|
| 67 |
+
|
| 68 |
+
|
| 69 |
classifier(sample)
|
| 70 |
|
| 71 |
# [{'label': 'health', 'score': 0.6779336333274841}]
|
|
|
|
| 72 |
|
| 73 |
+
```
|
| 74 |
## Citation
|
| 75 |
|
| 76 |
```
|