Run this model with HF Jobs
Run johnpaulbin/beanbox-toxic on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/johnpaulbin/beanbox-toxic. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/johnpaulbin/beanbox-toxic on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use johnpaulbin/beanbox-toxic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use johnpaulbin/beanbox-toxic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="johnpaulbin/beanbox-toxic")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("johnpaulbin/beanbox-toxic") model = AutoModel.from_pretrained("johnpaulbin/beanbox-toxic", device_map="auto") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
johnpaulbin/toxic-MiniLM-L6-H384-uncased
Test if a sentence is toxic. Only works for english sentences.
Usage
Basic classification. Labels: [NOT TOXIC, TOXIC]
Install setfit
!pip install setfit
from setfit import SetFitModel
model = SetFitModel.from_pretrained("johnpaulbin/beanbox-toxic")
inpt = "" #@param {type:"string"}
out = model.predict_proba([inpt])
if out[0][0] > out[0][1]:
print("Not toxic")
else:
print("Toxic!")
print(f"NOT TOXIC: {out[0][0]}\nTOXIC: {out[0][1]}")
- Downloads last month
- 65