--- title: ArabGuard Egyptian emoji: 🛡️ colorFrom: green colorTo: blue sdk: docker app_port: 7860 pinned: false --- # ArabGuard Egyptian This Docker Space trains the classifier during the image build from the public [`d12o6aa/ArabGuard-Egyptian-V1`](https://huggingface.co/datasets/d12o6aa/ArabGuard-Egyptian-V1) dataset, then serves the trained model through Streamlit. Only the source code, dependency lock, and Docker configuration belong in the Space repository. Model weights, checkpoints, downloaded datasets, caches, and dashboard outputs are generated during the Docker build and are ignored by Git. The first build can take a long time because `xlm-roberta-base` is trained on CPU. The Dockerfile uses a separate training stage, so downloaded data, Hugging Face caches, optimizer states, and checkpoints are not copied into the runtime image. Changing only `app.py` reuses the cached training layer when Docker cache is available; changing `train_model.py`, `requirements.txt`, or an earlier layer starts training again. ## Space repository contents Upload only: - `.dockerignore` - `.gitignore` - `Dockerfile` - `README.md` - `app.py` - `requirements.txt` - `train_model.py` Do not upload `.venv`, model weights, checkpoints, dataset files, caches, or `dashboard_data`. Before pushing, check the staged file list and sizes: ```bash git status --short git ls-files ``` The Space listens on port `7860`, as required by the `app_port` metadata above.