blizet commited on
Commit
f4d063d
·
verified ·
1 Parent(s): 9c1b47f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -12,7 +12,19 @@ model = AutoModelForCausalLM.from_pretrained(model_name)
12
  def analyze_email(email):
13
  prompt = f"""
14
  Analyze the email with the following criteria:
15
- ...
 
 
 
 
 
 
 
 
 
 
 
 
16
  Email: {email}
17
  """
18
  inputs = tokenizer(prompt, return_tensors="pt", truncation=True)
 
12
  def analyze_email(email):
13
  prompt = f"""
14
  Analyze the email with the following criteria:
15
+ 1. Is the email a phishing attempt? (Yes/No)
16
+ 2. Does the email create a sense of urgency? (Yes/No)
17
+ 3. Are there grammatical errors? (List the errors or respond with "None.")
18
+ 4. Does the email show intention to deceive or steal sensitive information? (Yes/No)
19
+ 5. Is the greeting customized or generalized? (Customized/Generalized)
20
+ 6. Does the email include a valid customer ID or reference number? (Yes/No)
21
+ 7. Is the sender’s email address suspicious or spoofed? (Yes/No, and explain if suspicious)
22
+ 8. Is the email requesting sensitive information such as passwords, bank details, or verification codes? (Yes/No)
23
+ 9. Is there a hyperlink in the email? If yes, does the link appear suspicious (e.g., misspelled domain, shortened URL)? (Yes/No, and explain)
24
+ 10. Is the tone of the email overly formal or informal, and does it match the sender’s usual style? (Formal/Informal, and Yes/No for match)
25
+ 11. Does the email refer to any specific past transaction or interaction? (Yes/No)
26
+ 12. Are there any noticeable inconsistencies, such as mismatched branding, incorrect logos, or unusual formatting? (List issues or respond with "None.")
27
+ 13. Does the email encourage you to bypass standard security procedures? (Yes/No)
28
  Email: {email}
29
  """
30
  inputs = tokenizer(prompt, return_tensors="pt", truncation=True)