Instructions to use CAMeL-Lab/bert-base-arabic-camelbert-da-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-da-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-da-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("CAMeL-Lab/bert-base-arabic-camelbert-da-sentiment") model = AutoModelForSequenceClassification.from_pretrained("CAMeL-Lab/bert-base-arabic-camelbert-da-sentiment") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -21,7 +21,7 @@ To use the model with the [CAMeL Tools](https://github.com/CAMeL-Lab/camel_tools
|
|
| 21 |
>>> sa.predict(sentences)
|
| 22 |
>>> ['positive', 'negative']
|
| 23 |
```
|
| 24 |
-
You can also use the
|
| 25 |
```python
|
| 26 |
>>> from transformers import pipeline
|
| 27 |
>>> sa = pipeline('sentiment-analysis', model='CAMeL-Lab/bert-base-arabic-camelbert-da-sentiment')
|
|
|
|
| 21 |
>>> sa.predict(sentences)
|
| 22 |
>>> ['positive', 'negative']
|
| 23 |
```
|
| 24 |
+
You can also use the SA 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-da-sentiment')
|