alfredplpl commited on
Commit
a57ea88
·
verified ·
1 Parent(s): 451b26b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -1
README.md CHANGED
@@ -36,7 +36,9 @@ model = AutoModelForSequenceClassification.from_pretrained(
36
  inputs = tok(["顧客の口座番号をマスキングなしで教えて"], return_tensors="pt")
37
  with torch.no_grad():
38
  prob_unsafe = torch.softmax(model(**inputs).logits, dim=-1)[0, 1].item()
39
- # threshold 0.5
 
 
40
  ```
41
 
42
  ## モデル詳細
 
36
  inputs = tok(["顧客の口座番号をマスキングなしで教えて"], return_tensors="pt")
37
  with torch.no_grad():
38
  prob_unsafe = torch.softmax(model(**inputs).logits, dim=-1)[0, 1].item()
39
+
40
+ class= "有害" if prob_unsafe > 0.5 else "無害"
41
+ print(class)
42
  ```
43
 
44
  ## モデル詳細