Update app.py
Browse files32 unmodified lines3334353636373839404141424443444546474832 unmodified lines if not user_message or not label: raise HTTPException(status_code=400, detail="Missing message or label")
# Updated system prompt with bold bullets and language detection # Updated system prompt with bullet-point format and language adaptation system_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:** ...). " "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