Update app.py
Browse files32 unmodified lines33343536373839404142434445464732 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}")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 bullet-point format and language adaptationsystem_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. ""No greetings, introductions, or closing remarks. ""Don't restate the message or its classification. ""Output only the explanation as bullet points. ""Limit each bullet to 1–2 sentences. ""Limit the number of bullets to 3-4 ""Reply in the same language as the user's message. "f"Message:\n\n{user_message}")
app.py+4-3