import gradio as gr
from llmConnect import chat
title = """
🛡️ Security Assistant
Your trusted companion for identifying security threats
"""
description = """
### 🔒 How I Can Help You:
- Analyze suspicious emails & links
- Identify potential phishing attempts
- Guide you through security best practices
- Explain social engineering tactics
### 💡 Example Questions:
1. "Is this email suspicious?"
2. "What are signs of phishing?"
3. "How can I protect against social engineering?"
"""
css = """
.gradio-container {font-family: 'Inter', sans-serif}
.chat-message {font-size: 16px !important; padding: 15px !important;}
.chat-message-dark {background-color: #2B2A4C !important; color: white !important;}
.chat-message-light {background-color: #f3f4f6 !important;}
"""
gr.ChatInterface(
fn=chat,
chatbot=gr.Chatbot(height=500, bubble_full_width=False),
title=title,
description=description,
theme=gr.themes.Soft(),
css=css,
examples=[
["Is this email a phishing attempt: 'Dear user, your account needs urgent verification. Click here.'"],
["What are common signs of social engineering?"],
["How can I verify if a sender's email is legitimate?"]
],
).launch()