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/backend/pyproject.toml from x6nux/laya-ad: direct link, hf CLI and curl.
- Browser
- Download file 564 Bytes
-
https://huggingface.co/x6nux/laya-ad/resolve/main/code/laya-server/backend/pyproject.toml
- Command line
-
hf download hf://x6nux/laya-ad/code/laya-server/backend/pyproject.toml
-
curl -L -o pyproject.toml https://huggingface.co/x6nux/laya-ad/resolve/main/code/laya-server/backend/pyproject.toml
564 Bytes
| [project] | |
| name = "laya-server" | |
| version = "0.1.0" | |
| license = { text = "Apache-2.0" } | |
| requires-python = ">=3.12" | |
| dependencies = [ | |
| "fastapi==0.141.1", | |
| "uvicorn==0.53.0", | |
| "argon2-cffi==25.1.0", | |
| "pydantic==2.13.5", | |
| # ad-clf 后端依赖;torch 由镜像单独以 CPU 轮子安装(避免默认源拉 CUDA 版) | |
| "transformers==5.20.2", | |
| "safetensors>=0.6.0", | |
| ] | |
| [project.optional-dependencies] | |
| test = ["httpx==0.28.1", "pytest==9.1.1"] | |
| [tool.fastapi] | |
| entrypoint = "server.main:app" | |
| [tool.pytest.ini_options] | |
| testpaths = ["tests"] | |