Text Classification
Transformers
Safetensors
Chinese
spam-detection
advertising-detection
ad-classification
chinese
modernbert
mmbert
multi-task
four-head
Instructions to use x6nux/laya-ad with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use x6nux/laya-ad with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="x6nux/laya-ad")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("x6nux/laya-ad", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download code/laya-server/build_push.sh from x6nux/laya-ad: direct link, hf CLI and curl.
- Browser
- Download file 828 Bytes
-
https://huggingface.co/x6nux/laya-ad/resolve/main/code/laya-server/build_push.sh
- Command line
-
hf download hf://x6nux/laya-ad/code/laya-server/build_push.sh
-
curl -L -o build_push.sh https://huggingface.co/x6nux/laya-ad/resolve/main/code/laya-server/build_push.sh
828 Bytes
| # 本地构建并推送 laya-server 到 Docker Hub。 | |
| # 用法: | |
| # docker login | |
| # ./build_push.sh v2 # 构建 x6nux/laya-server:v2 并推送(同时更新 latest) | |
| # TAG=v2 IMAGE=yourname/laya-server PUSH_LATEST=0 ./build_push.sh | |
| set -euo pipefail | |
| cd "$(dirname "$0")" | |
| TAG="${1:-${TAG:-v2.2}}" | |
| IMAGE="${IMAGE:-x6nux/laya-server}" | |
| PLATFORM="${PLATFORM:-linux/amd64}" | |
| PUSH_LATEST="${PUSH_LATEST:-1}" | |
| echo "[build] ${IMAGE}:${TAG} (${PLATFORM})" | |
| docker build --platform "${PLATFORM}" -t "${IMAGE}:${TAG}" . | |
| if [ "${PUSH_LATEST}" = "1" ]; then | |
| docker tag "${IMAGE}:${TAG}" "${IMAGE}:latest" | |
| fi | |
| echo "[push] ${IMAGE}:${TAG}" | |
| docker push "${IMAGE}:${TAG}" | |
| if [ "${PUSH_LATEST}" = "1" ]; then | |
| echo "[push] ${IMAGE}:latest" | |
| docker push "${IMAGE}:latest" | |
| fi | |
| echo "[done] ${IMAGE}:${TAG}" | |