Instructions to use CAMeL-Lab/bert-base-arabic-camelbert-msa-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CAMeL-Lab/bert-base-arabic-camelbert-msa-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CAMeL-Lab/bert-base-arabic-camelbert-msa-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("CAMeL-Lab/bert-base-arabic-camelbert-msa-sentiment") model = AutoModelForSequenceClassification.from_pretrained("CAMeL-Lab/bert-base-arabic-camelbert-msa-sentiment") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -24,7 +24,7 @@ To use the model with the [CAMeL Tools](https://github.com/CAMeL-Lab/camel_tools
|
|
| 24 |
You can also use the NER model directly with a transformers pipeline:
|
| 25 |
```python
|
| 26 |
>>> from transformers import pipeline
|
| 27 |
-
>>> sa = pipeline('
|
| 28 |
>>> sentences = ['أنا بخير', 'أنا لست بخير']
|
| 29 |
>>> sa(sentences)
|
| 30 |
[{'label': 'positive', 'score': 0.9616648554801941},
|
|
|
|
| 24 |
You can also use the NER model directly with a transformers pipeline:
|
| 25 |
```python
|
| 26 |
>>> from transformers import pipeline
|
| 27 |
+
>>> sa = pipeline('sentiment-analysis', model='CAMeL-Lab/bert-base-arabic-camelbert-msa-sentiment')
|
| 28 |
>>> sentences = ['أنا بخير', 'أنا لست بخير']
|
| 29 |
>>> sa(sentences)
|
| 30 |
[{'label': 'positive', 'score': 0.9616648554801941},
|