avilum commited on
Commit
0e715ee
·
verified ·
1 Parent(s): 1602251

Update infer.py

Browse files
Files changed (1) hide show
  1. infer.py +2 -2
infer.py CHANGED
@@ -61,7 +61,7 @@ class PromptGuardAnomalyDetector(AbstractAnomalyDetector):
61
  super().__init__(threshold)
62
  print('Loading prompt guard model...')
63
  self.classifier = pipeline(
64
- "text-classification", model="../data/models/Prompt-Guard-86M"
65
  )
66
 
67
  def detect_anomaly(
@@ -80,7 +80,7 @@ class PromptGuardAnomalyDetector(AbstractAnomalyDetector):
80
  KnownAttackVector(
81
  known_prompt=anomaly["label"],
82
  similarity_percentage=anomaly["score"],
83
- source="Prompt-Guard-86M",
84
  )
85
  for anomaly in anomalies
86
  if anomaly["score"] >= threshold
 
61
  super().__init__(threshold)
62
  print('Loading prompt guard model...')
63
  self.classifier = pipeline(
64
+ "text-classification", model="meta-llama/Llama-Prompt-Guard-2-86M"
65
  )
66
 
67
  def detect_anomaly(
 
80
  KnownAttackVector(
81
  known_prompt=anomaly["label"],
82
  similarity_percentage=anomaly["score"],
83
+ source="meta-llama/Llama-Prompt-Guard-2-86M",
84
  )
85
  for anomaly in anomalies
86
  if anomaly["score"] >= threshold