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
File size: 924 Bytes
0cd599e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #!/bin/sh
set -eu
cd "$(dirname "$0")/.."
if [ ! -f .env ]; then
echo 'Missing .env. Copy .env.example to .env and set the administrator password.' >&2
exit 1
fi
if [ ! -x .venv/bin/uvicorn ]; then
echo 'Missing .venv. Install the backend dependencies described in README.md.' >&2
exit 1
fi
set -a
. ./.env
set +a
if [ -z "${LAYA_ADMIN_PASSWORD:-}" ] && [ -z "${LAYA_ADMIN_PASSWORD_HASH:-}" ]; then
echo 'Set LAYA_ADMIN_PASSWORD or LAYA_ADMIN_PASSWORD_HASH in .env before starting the backend.' >&2
exit 1
fi
# Vite proxies /internal and /v1 to this backend during local development.
export LAYA_DATABASE_PATH=./data/laya.sqlite3
export LAYA_MODEL_DIR=./models
export LAYA_DEVICE="${LAYA_DEVICE:-cpu}"
export HF_HOME=./models/.cache
export LAYA_FRONTEND_DIR=./frontend/dist
exec .venv/bin/uvicorn server.main:app --host 127.0.0.1 --port 8000 --reload --reload-dir backend/server
|