Is he flirting?
Fine-tuned model that checks whether someone is flirting with you
Authors
Running Tests
To run tests, run the following command
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained(path)
model = AutoModelForSequenceClassification.from_pretrained(path)
model.eval()
text = "Input Text"
device = next(model.parameters()).device
inputs = tokenizer(
text,
return_tensors="pt",
max_length=128,
padding="max_length",
truncation=True,
return_token_type_ids=False
)
inputs = inputs.to(device)
with torch.no_grad():
out = model(**inputs)
logits = out["logits"]
probs = torch.softmax(logits, dim=-1)
pred_class = torch.argmax(probs, dim=-1).item()
prob_class0 = probs[0, 0].item()
prob_class1 = probs[0, 1].item()
print("pred:", "Flirting" if pred_class else "Not Flirting")
print(f"prob class {pred_class}: {max(prob_class0, prob_class1)}", )```
- Downloads last month
- 8
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Model tree for Dotaein/Isheflirting
Base model
monologg/koelectra-small-v3-discriminator