Run this model with HF Jobs
Run Eng-Ali/arabic-sentiment-analysis on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Eng-Ali/arabic-sentiment-analysis. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Eng-Ali/arabic-sentiment-analysis on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Eng-Ali/arabic-sentiment-analysis with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Eng-Ali/arabic-sentiment-analysis with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://Eng-Ali/arabic-sentiment-analysis") - fastText
How to use Eng-Ali/arabic-sentiment-analysis with fastText:
from huggingface_hub import hf_hub_download import fasttext model = fasttext.load_model(hf_hub_download("Eng-Ali/arabic-sentiment-analysis", "model.bin")) - Notebooks
- Google Colab
- Kaggle
Arabic Sentiment Analysis
Classifies Arabic customer reviews into Positive, Negative or Mixed.
Pipeline
- Cleaning: remove links, diacritics, tatweel and numbers; map emojis to sentiment tokens; reduce repeated letters.
- Lemmatization: CAMeL Tools MLE disambiguator, keeping negation and intensifier words.
- Embeddings: FastText Arabic 300d (frozen).
- Model: 2 stacked SimpleRNN layers (64, 32) + Dropout + Softmax.
Training
| Item | Value |
|---|---|
| Dataset | Arabic 100K Reviews |
| Split | 80% train / 20% test |
| Max length | 30 tokens |
| Vocabulary | 10,000 words |
| Test accuracy | 62.4% |
Files
| File | Description |
|---|---|
arabic_sentiment_model.keras |
Trained model |
tokenizer.json |
Keras tokenizer |
classes.json |
Label order |
app.py |
Gradio web interface |
requirements.txt |
Dependencies |
training_notebook.ipynb |
Full training notebook |
Run the demo
pip install -r requirements.txt
python app.py
- Downloads last month
- 19