ccss17 commited on
Commit
ca0031b
·
1 Parent(s): c11fb0c
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -33,7 +33,10 @@ def encode_domain(domain: str, max_len: int = 64):
33
  # Load model from HuggingFace Hub
34
  MODEL_NAME = "ccss17/dga-transformer-encoder" # Replace with your model
35
  print(f"Loading model from {MODEL_NAME}...")
36
- model = AutoModelForSequenceClassification.from_pretrained(MODEL_NAME)
 
 
 
37
  model.eval()
38
 
39
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
33
  # Load model from HuggingFace Hub
34
  MODEL_NAME = "ccss17/dga-transformer-encoder" # Replace with your model
35
  print(f"Loading model from {MODEL_NAME}...")
36
+ model = AutoModelForSequenceClassification.from_pretrained(
37
+ MODEL_NAME,
38
+ trust_remote_code=True, # Required for custom model architecture
39
+ )
40
  model.eval()
41
 
42
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")