Update app.py
Browse filesupdated prompt
32 unmodified lines3334353637383940414243444532 unmodified linesif not user_message or not label:raise HTTPException(status_code=400, detail="Missing message or label")# Updated system prompt with bullet-point formatsystem_prompt = (f"You are a robot that identifies phishing and safe messages. "f"The message was classified as '{label}'. ""Explain why this decision was made and point out any words or patterns that led to it. ""Limit your answer to 2–3 sentences. No greetings, introductions, or closing remarks. ""Don't restate the message or its classification. Output only the explanation as bullet points. "f"Message:\n\n{user_message}")32 unmodified lines3334353637383940414243444546474832 unmodified linesif not user_message or not label:raise HTTPException(status_code=400, detail="Missing message or label")# Updated system prompt with bold bullets and language detectionsystem_prompt = (f"You are a robot that identifies phishing and safe messages. "f"The message was classified as '{label}'. ""Explain why this decision was made and point out any words or patterns that led to it. ""Limit your answer to 2–3 sentences. ""No greetings, introductions, or closing remarks. ""Don't restate the message or its classification. ""Output only the explanation as bullet points, and **start each bullet with bold text** (e.g., **Reason:** ...). ""Reply in the same language as the user's message. "f"Message:\n\n{user_message}")
app.py+6-3