hbseong commited on
Commit
7aad0a1
·
verified ·
1 Parent(s): 85b8dea

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -0
README.md CHANGED
@@ -37,6 +37,8 @@ import torch.nn.functional as F
37
  tokenizer = AutoTokenizer.from_pretrained("hbseong/HarmAug-Guard")
38
  model = AutoModelForSequenceClassification.from_pretrained("hbseong/HarmAug-Guard")
39
 
 
 
40
  def predict(prompt, response=None):
41
  if response == None:
42
  inputs = tokenizer(prompt, return_tensors="pt")
 
37
  tokenizer = AutoTokenizer.from_pretrained("hbseong/HarmAug-Guard")
38
  model = AutoModelForSequenceClassification.from_pretrained("hbseong/HarmAug-Guard")
39
 
40
+ # If response is not given, the model will predict the unsafe score of the prompt.
41
+ # If response is given, the model will predict the unsafe score of the response.
42
  def predict(prompt, response=None):
43
  if response == None:
44
  inputs = tokenizer(prompt, return_tensors="pt")