Text Classification
Transformers
Safetensors
English
modernbert
feature-extraction
esg
sustainability
multi-label
finance
text-embeddings-inference
Instructions to use CobuildX-AI/cbx-bfs-esg-topic-classifier-68M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CobuildX-AI/cbx-bfs-esg-topic-classifier-68M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CobuildX-AI/cbx-bfs-esg-topic-classifier-68M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("CobuildX-AI/cbx-bfs-esg-topic-classifier-68M") model = AutoModel.from_pretrained("CobuildX-AI/cbx-bfs-esg-topic-classifier-68M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download example.py from CobuildX-AI/cbx-bfs-esg-topic-classifier-68M: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/CobuildX-AI/cbx-bfs-esg-topic-classifier-68M/resolve/main/example.py
- Command line
-
hf download hf://CobuildX-AI/cbx-bfs-esg-topic-classifier-68M/example.py
-
curl -L -o example.py https://huggingface.co/CobuildX-AI/cbx-bfs-esg-topic-classifier-68M/resolve/main/example.py
1.37 kB
| # Copyright 2026 Cobuild Tech Private Limited | |
| # SPDX-License-Identifier: Apache-2.0 | |
| """Run from the model folder: python example.py (every company and passage below is invented)""" | |
| from cbx_esg import ESGClassifier | |
| clf = ESGClassifier(".") | |
| passages = [ | |
| "During 2025 Larkspur Industrial reduced its Scope 1 and Scope 2 greenhouse gas emissions by 18 percent " | |
| "compared with its 2019 baseline, mainly by switching two smelting lines to electric furnaces and buying " | |
| "renewable electricity for its European plants. The Board's Sustainability Committee reviews progress against " | |
| "the 2030 target each quarter.", | |
| "Fenwick Foods agreed to pay a civil penalty of $2.4 million to resolve allegations that it failed to report " | |
| "injuries at its packaging plant and exposed workers to unguarded machinery. The company also agreed to hire an " | |
| "independent safety consultant and to retrain line supervisors.", | |
| "Our principal executive offices are located at 400 Harbor Street, Suite 12, and our telephone number is " | |
| "(555) 010-2300. Our common stock is listed on the exchange under the symbol \"HRBR\".", | |
| ] | |
| for text, r in zip(passages, clf.classify(passages)): | |
| names = ", ".join(f"{t} {clf.topic_name(t)}" for t in r["topics"]) or "no ESG topic (N00)" | |
| print(f"{names} | primary {r['primary']} | orientation {r['orientation']}") | |