Update handler.py
Browse files- handler.py +4 -4
handler.py
CHANGED
@@ -7,10 +7,10 @@ from peft import PeftModel
|
|
7 |
|
8 |
# Load model and tokenizer
|
9 |
model_name = "munzirmuneer/phishing_url_gemma_pytorch" # Replace with your specific model
|
10 |
-
|
11 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
12 |
-
model = AutoModelForSequenceClassification.from_pretrained(model_name
|
13 |
-
model = PeftModel.from_pretrained(model, model_name
|
14 |
|
15 |
def predict(input_text):
|
16 |
# Tokenize input
|
|
|
7 |
|
8 |
# Load model and tokenizer
|
9 |
model_name = "munzirmuneer/phishing_url_gemma_pytorch" # Replace with your specific model
|
10 |
+
model_name2 = "google/gemma-2b"
|
11 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name2)
|
12 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
13 |
+
model = PeftModel.from_pretrained(model, model_name)
|
14 |
|
15 |
def predict(input_text):
|
16 |
# Tokenize input
|