Update app.py
Browse files
app.py
CHANGED
@@ -9,17 +9,7 @@ model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
|
9 |
|
10 |
@spaces.GPU
|
11 |
def predict_phishing(text):
|
12 |
-
|
13 |
-
if "magnificent" in text.lower():
|
14 |
-
return {
|
15 |
-
"Prediction": "✅ Legitimate",
|
16 |
-
"Confidence": "100.00%",
|
17 |
-
"Probability Breakdown": {
|
18 |
-
"Legitimate": "1.0000",
|
19 |
-
"Phishing": "0.0000"
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
model.to('cuda')
|
24 |
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512, padding=True)
|
25 |
inputs = {k: v.to('cuda') for k, v in inputs.items()}
|
|
|
9 |
|
10 |
@spaces.GPU
|
11 |
def predict_phishing(text):
|
12 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
model.to('cuda')
|
14 |
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512, padding=True)
|
15 |
inputs = {k: v.to('cuda') for k, v in inputs.items()}
|