Che237 commited on
Commit
732340d
·
verified ·
1 Parent(s): 6f63c25

Switch security-chat to Mistral-7B-Instruct (ZySec not on free Inference API)

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -528,7 +528,10 @@ class TransformerModelLoader:
528
  "desc": "BERT-based URL phishing/malware classifier",
529
  },
530
  }
531
- SECURITY_LLM_REPO = "ZySec-AI/SecurityLLM" # Used via HF Inference API only
 
 
 
532
 
533
  def __init__(self):
534
  self.pipelines = {} # name → transformers.Pipeline (lazy-loaded)
 
528
  "desc": "BERT-based URL phishing/malware classifier",
529
  },
530
  }
531
+ # Model used via HF Inference API. ZySec-AI/SecurityLLM isn't served on the
532
+ # free Inference API tier (404). Mistral-7B-Instruct-v0.3 is widely available
533
+ # and works well for cyber Q&A. Override via SECURITY_LLM_MODEL env var.
534
+ SECURITY_LLM_REPO = os.environ.get("SECURITY_LLM_MODEL", "mistralai/Mistral-7B-Instruct-v0.3")
535
 
536
  def __init__(self):
537
  self.pipelines = {} # name → transformers.Pipeline (lazy-loaded)