Views
No views yet
adult, safe1from setfit import SetFitModel
2
3# Load the model
4model = SetFitModel.from_pretrained("setfit-multilingual-e5-nsfw-classifier")
5
6# Run inference
7texts = [
8 "domain:example.com\ntitle:Weather forecast\ndescription:Sunny skies expected",
9 "domain:news.com\ntitle:Breaking news\ndescription:Important developments",
10]
11predictions = model.predict(texts)
12print(predictions)domain:<domain_name>
title:<article_title>
description:<article_description>adult: Content is flagged as adult/NSFWsafe: Content is safe for work1@article{https://doi.org/10.48550/arxiv.2209.11055,
2 doi = {10.48550/ARXIV.2209.11055},
3 url = {https://arxiv.org/abs/2209.11055},
4 author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
5 title = {Efficient Few-Shot Learning Without Prompts},
6 publisher = {arXiv},
7 year = {2022},
8 copyright = {Creative Commons Attribution 4.0 International}
9}