impresso project / impresso ad classification xlm one class Multilingual ad detector built on top of an XLM R–based genre model and a lightweight binary decision layer. It combines the model’s “Promotion” probability with smart chunking, pooling, and rules (prices, phones, cues, etc.) to classify any input text as AD or NOT AD . Optimized for FR / DE / LB, but works on “other” languages too. 🔌 Quickstart Batch input Dict input (with metadata) 📦 What this repo contains model.safetensors / pytorch model.bin + config.json + tokenizer files pipeline.py — custom HF pipeline that turns the multi genre model into a binary ad detector (AD / NOT AD) best params final.json — default inference knobs (loaded automatically if present) (optional) meta classifier.pkl — extra stacking model (if you provide one) The Hugging Face inference widget doesn’t run custom code; use Python as shown above or build a small Space. 🧠 How it works (inference) 1. Normalize text → optional chunking by word count 2. Encode chunks → get logits from the base model 3. Pool across chunks (max/mean/logits methods) 4. Read “Promotion” probability + other label probs 5. Apply adaptive thresholding (language & length aw…
We use cookies for essential functionality and analytics. You can accept or reject analytics cookies.Cookie policy