Instructions to use govtech/lionguard-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use govtech/lionguard-v1 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("govtech/lionguard-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
metadata
license: other
license_name: govtech-singapore
license_link: LICENSE
LionGuard
LionGuard is a classifier for detecting unsafe content in the Singapore context. It uses pre-trained BAAI English embeddings and performs classification with a trained Ridge Classification model.
Usage
- Install
transformers,onnxruntimeandhuggingface_hublibraries.
pip install transformers onnxruntime huggingface_hub
- Run inference.
python inference.py '["Example text 1"]'
Technical report is available here.